diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
commit | 5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch) | |
tree | f3a6e5b5c38263fe527e6275ff95425f12637226 /asmrun/hppa.S | |
parent | 8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff) | |
download | ocaml-gcaml.tar.gz |
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmrun/hppa.S')
-rw-r--r-- | asmrun/hppa.S | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/asmrun/hppa.S b/asmrun/hppa.S index 713caea666..c8a265e203 100644 --- a/asmrun/hppa.S +++ b/asmrun/hppa.S @@ -30,18 +30,18 @@ #define LOWLABEL(x) RR%x #endif -#ifdef SYS_nextstep -#define G(x) _##x +#ifdef SYS_linux +#define G(x) x #define CODESPACE .text -#define CODE_ALIGN 2 +#define CODE_ALIGN 8 #define EXPORT_CODE(x) .globl x #define EXPORT_DATA(x) .globl x #define STARTPROC #define ENDPROC -#define LOADHIGH(x) ldil L`x, %r1 -#define LOW(x) R`x -#define LOADHIGHLABEL(x) ldil L`x, %r1 -#define LOWLABEL(x) R`x +#define LOADHIGH(x) addil LR%x-$global$, %r27 +#define LOW(x) RR%x-$global$ +#define LOADHIGHLABEL(x) ldil LR%x, %r1 +#define LOWLABEL(x) RR%x #endif #ifdef SYS_hpux @@ -69,14 +69,15 @@ caml_exception_pointer .comm 8 caml_required_size .comm 8 #endif -#ifdef SYS_nextstep - .comm G(caml_young_limit), 8 - .comm G(caml_young_ptr), 8 - .comm G(caml_bottom_of_stack), 8 - .comm G(caml_last_return_address), 8 - .comm G(caml_gc_regs), 8 - .comm G(caml_exception_pointer), 8 - .comm G(caml_required_size), 8 +#ifdef SYS_linux + .align 8 + .comm G(young_limit), 4 + .comm G(young_ptr), 4 + .comm G(caml_bottom_of_stack), 4 + .comm G(caml_last_return_address), 4 + .comm G(caml_gc_regs), 4 + .comm G(caml_exception_pointer), 4 + .comm G(caml_required_size), 4 #endif ; Allocation functions @@ -173,14 +174,8 @@ L100: ldo -(64 + 4*32)(%r30), %r31 fstds,ma %fr30, 8(%r1) ; Call the garbage collector -#ifdef SYS_nextstep - ldil L`G(caml_garbage_collection), %r1 - ble R`G(caml_garbage_collection)(4, %r1) - copy %r31, %r2 -#else bl G(caml_garbage_collection), %r2 nop -#endif ; Restore all regs used by the code generator ldo -(64 + 4*32)(%r30), %r1 @@ -452,14 +447,8 @@ L103: ; Re-raise the exception through caml_raise, to clean up local C roots ldo 64(%r30), %r30 -#ifdef SYS_nextstep - ldil L`G(caml_raise), %r1 - ble R`G(caml_raise)(4, %r1) - copy %r31, %r2 -#else bl G(caml_raise), %r2 nop -#endif ENDPROC ; Raise an exception from C @@ -529,13 +518,8 @@ G(caml_callback3_exn): G(caml_ml_array_bound_error): STARTPROC ; Load address of [caml_array_bound_error] in %r22 -#ifdef SYS_hpux ldil LR%caml_array_bound_error, %r22 ldo RR%caml_array_bound_error(%r22), %r22 -#else - ldil L`_caml_array_bound_error, %r22 - ldo R`_caml_array_bound_error(%r22), %r22 -#endif ; Reserve 48 bytes of stack space and jump to caml_c_call b G(caml_c_call) ldo 48(%r30), %r30 /* in delay slot */ |