|
@@ -26,7 +26,7 @@ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
- */
|
|
|
+*/
|
|
|
|
|
|
package main
|
|
|
|
|
@@ -65,12 +65,12 @@ type Bootmethods struct {
|
|
|
Name string
|
|
|
Config string
|
|
|
Connect string
|
|
|
- Arg string
|
|
|
+ Arg string
|
|
|
}
|
|
|
|
|
|
type Sysconf struct {
|
|
|
- Syscalls []Syscall
|
|
|
- Syserrors []Syserror
|
|
|
+ Syscalls []Syscall
|
|
|
+ Syserrors []Syserror
|
|
|
Bootmethods []Bootmethods
|
|
|
}
|
|
|
|
|
@@ -200,7 +200,7 @@ TEXT runtime·{{ .Libname }}(SB),NOSPLIT,$0
|
|
|
a := os.Getenv("ARCH")
|
|
|
switch a {
|
|
|
case "aarch64":
|
|
|
- tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
+ tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
.globl {{ .Libname }}
|
|
|
{{ .Libname }}:
|
|
|
mov x8, #{{ .Id }}
|
|
@@ -208,7 +208,7 @@ TEXT runtime·{{ .Libname }}(SB),NOSPLIT,$0
|
|
|
ret
|
|
|
`)
|
|
|
case "amd64":
|
|
|
- tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
+ tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
.globl {{ .Libname }}
|
|
|
{{ .Libname }}:
|
|
|
movq %rcx, %r10 /* rcx gets smashed by systenter. Use r10.*/
|
|
@@ -216,20 +216,20 @@ TEXT runtime·{{ .Libname }}(SB),NOSPLIT,$0
|
|
|
syscall
|
|
|
ret
|
|
|
`)
|
|
|
- if err != nil {
|
|
|
- log.Fatal(err)
|
|
|
- }
|
|
|
+ if err != nil {
|
|
|
+ log.Fatal(err)
|
|
|
+ }
|
|
|
case "riscv":
|
|
|
- tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
+ tmpl, err = template.New("syscall.s").Parse(`/* automatically generated by mksys */
|
|
|
.globl {{ .Libname }}
|
|
|
{{ .Libname }}:
|
|
|
li a7, {{ .Id }} /* Put the system call into a7 so we don't have to move a0-a6 around*/
|
|
|
scall
|
|
|
ret
|
|
|
`)
|
|
|
- if err != nil {
|
|
|
- log.Fatal(err)
|
|
|
- }
|
|
|
+ if err != nil {
|
|
|
+ log.Fatal(err)
|
|
|
+ }
|
|
|
default:
|
|
|
usage(a + " is not supported for system call generation.")
|
|
|
}
|