diff options
| author | Kai Backman <kaib@golang.org> | 2009-06-23 11:54:23 -0700 |
|---|---|---|
| committer | Kai Backman <kaib@golang.org> | 2009-06-23 11:54:23 -0700 |
| commit | be639b9a51294413be3dc8aa6583654d82e63b97 (patch) | |
| tree | 5516e0a0ca78f18d355f63ede13e9b49e452da88 /src/pkg/runtime/linux/arm/sys.s | |
| parent | b6ce2a72e1dc6a5bf0fc1dc1c270f7bcbc5197c9 (diff) | |
| download | go-be639b9a51294413be3dc8aa6583654d82e63b97.tar.xz | |
Runtime is now starting up with a dummy c program as target:
- morestack and gosave/gogo/gocall support
- memclr and memset from inferno
- bugfixes in _rt0_arm
R=rsc
APPROVED=rsc
DELTA=304 (174 added, 36 deleted, 94 changed)
OCL=30636
CL=30642
Diffstat (limited to 'src/pkg/runtime/linux/arm/sys.s')
| -rw-r--r-- | src/pkg/runtime/linux/arm/sys.s | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/pkg/runtime/linux/arm/sys.s b/src/pkg/runtime/linux/arm/sys.s index 25e64a3587..c61d08f090 100644 --- a/src/pkg/runtime/linux/arm/sys.s +++ b/src/pkg/runtime/linux/arm/sys.s @@ -6,23 +6,28 @@ // System calls and other sys.stuff for arm, Linux // +#define SYS_BASE 0x00900000 +#define SYS_exit (SYS_BASE + 1) +#define SYS_write (SYS_BASE + 4) +#define SYS_mmap2 (SYS_BASE + 192) + TEXT write(SB),7,$0 MOVW 8(SP), R1 MOVW 12(SP), R2 - SWI $0x00900004 // syscall write + SWI $SYS_write RET TEXT exit(SB),7,$0 - SWI $0x00900001 // exit value in R0 - -TEXT sys·write(SB),7,$0 - MOVW 8(SP), R1 - MOVW 12(SP), R2 - SWI $0x00900004 // syscall write - RET + // Exit value already in R0 + SWI $SYS_exit TEXT sys·mmap(SB),7,$0 - BL abort(SB) + MOVW 4(FP), R1 + MOVW 8(FP), R2 + MOVW 12(FP), R3 + MOVW 16(FP), R4 + MOVW 20(FP), R5 + SWI $SYS_mmap2 RET // int64 futex(int32 *uaddr, int32 op, int32 val, |
