View | Details | Raw Unified
Collapse All | Expand All

(-) ocaml-3.09.3/asmcomp/sparc/emit.mlp.old (-1 / +110 lines)
 Lines 334-340    Link Here 
            -e 's|%%MODEL%%|$(MODEL)|' \
            -e 's|%%MODEL%%|$(MODEL)|' \
            -e 's|%%SYSTEM%%|$(SYSTEM)|' \
            -e 's|%%SYSTEM%%|$(SYSTEM)|' \
            -e 's|%%EXT_OBJ%%|.o|' \
            -e 's|%%EXT_OBJ%%|.o|' \
            -e 's|%%EXT_ASM%%|.s|' \
            -e 's|%%EXT_ASM%%|.S|' \
            -e 's|%%EXT_LIB%%|.a|' \
            -e 's|%%EXT_LIB%%|.a|' \
            -e 's|%%EXT_DLL%%|.so|' \
            -e 's|%%EXT_DLL%%|.so|' \
            -e 's|%%SYSTHREAD_SUPPORT%%|$(SYSTHREAD_SUPPORT)|' \
            -e 's|%%SYSTHREAD_SUPPORT%%|$(SYSTHREAD_SUPPORT)|' \
 Lines 438-440    Link Here 
        .word   -1              /* negative frame size => use callback link */
        .word   -1              /* negative frame size => use callback link */
        .word   0               /* no roots here */
        .word   0               /* no roots here */
        .align  3
        .align  3
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 334-336    Link Here 
        .align  16
        .align  16
caml_absf_mask:
caml_absf_mask:
	.quad	0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
	.quad	0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 337-339    Link Here 
        .short  -1              /* negative frame size => use callback link */
        .short  -1              /* negative frame size => use callback link */
        .short  0               /* no roots */
        .short  0               /* no roots */
        .align  2
        .align  2
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 532-534    Link Here 
        .long   L104 + 3        /* return address into callback */
        .long   L104 + 3        /* return address into callback */
        .short  -1              /* negative frame size => use callback link */
        .short  -1              /* negative frame size => use callback link */
        .short  0               /* no roots */
        .short  0               /* no roots */
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 371-373    Link Here 
#ifdef __ELF__
#ifdef __ELF__
	.section .note.GNU-stack,"",%progbits
	.section .note.GNU-stack,"",%progbits
#endif
#endif
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 528-530    Link Here 
        .common caml_saved_bsp#, 8, 8
        .common caml_saved_bsp#, 8, 8
        .common caml_saved_rnat#, 8, 8
        .common caml_saved_rnat#, 8, 8
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 242-244    Link Here 
        .long   L107            | return address into callback
        .long   L107            | return address into callback
        .word   -1              | negative frame size => use callback link
        .word   -1              | negative frame size => use callback link
        .word   0               | no roots here
        .word   0               | no roots here
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 511-513    Link Here 
        .csect  caml_callback3_exn[DS]
        .csect  caml_callback3_exn[DS]
caml_callback3_exn:
caml_callback3_exn:
        .long   .caml_callback3_exn, TOC[tc0], 0
        .long   .caml_callback3_exn, TOC[tc0], 0
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 419-421    Link Here 
        .short  -1              /* negative size count => use callback link */
        .short  -1              /* negative size count => use callback link */
        .short  0               /* no roots here */
        .short  0               /* no roots here */
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 414-416    Link Here 
        .short  -1              /* negative size count => use callback link */
        .short  -1              /* negative size count => use callback link */
        .short  0               /* no roots here */
        .short  0               /* no roots here */
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 405-407    Link Here 
        .type Caml_raise_exception, #function
        .type Caml_raise_exception, #function
	.type Caml_system__frametable, #object
	.type Caml_system__frametable, #object
#endif
#endif
#ifdef __ELF__
.section .note.GNU-stack,,%progbits
#endif
 Lines 642-647    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 661-666    Link Here 
  `{emit_symbol lbl_begin}:\n`
  `{emit_symbol lbl_begin}:\n`
let end_assembly () =
let end_assembly () =
  nx_stack();
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  `	.text\n`;
  `	.text\n`;
  `	.global	{emit_symbol lbl_end}\n`;
  `	.global	{emit_symbol lbl_end}\n`;
 Lines 914-919    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 927-932    Link Here 
  `{emit_symbol lbl_begin}:\n`
  `{emit_symbol lbl_begin}:\n`
let end_assembly() =
let end_assembly() =
  nx_stack();
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  `	.text\n`;
  `	.text\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
 Lines 1306-1311    Link Here 
  `	.align 8\n`;
  `	.align 8\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 1315-1320    Link Here 
  emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
  emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
let end_assembly () =
let end_assembly () =
  nx_stack();
  `	.data\n`;
  `	.data\n`;
  emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
  emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
  `	.text\n`;
  `	.text\n`;
 Lines 994-999    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 1022-1027    Link Here 
let end_assembly() =
let end_assembly() =
  nx_stack();
  `	.code\n`;
  `	.code\n`;
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  declare_global lbl_end;
  declare_global lbl_end;
 Lines 546-551    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 574-579    Link Here 
  `	.end	{emit_symbol lbl_begin}\n`
  `	.end	{emit_symbol lbl_begin}\n`
let end_assembly () =
let end_assembly () =
  nx_stack();
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  `	.text\n`;
  `	.text\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
 Lines 658-663    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 671-676    Link Here 
  `{emit_symbol lbl_begin}:\n`
  `{emit_symbol lbl_begin}:\n`
let end_assembly() =
let end_assembly() =
  nx_stack();
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  `	.text\n`;
  `	.text\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
 Lines 811-816    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 843-848    Link Here 
  `{emit_symbol lbl_begin}:\n`
  `{emit_symbol lbl_begin}:\n`
let end_assembly () =
let end_assembly () =
  nx_stack();
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  let lbl_end = Compilenv.make_symbol (Some "code_end") in
  `	.text\n`;
  `	.text\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
  `	.globl	{emit_symbol lbl_end}\n`;
 Lines 879-884    Link Here 
  emit_string data_space;
  emit_string data_space;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
 Lines 898-903    Link Here 
  `{emit_symbol lbl_begin}:\n`
  `{emit_symbol lbl_begin}:\n`
let end_assembly() =
let end_assembly() =
  nx_stack();
  (* Emit the jump table *)
  (* Emit the jump table *)
  if !num_jumptbl_entries > 0 then begin
  if !num_jumptbl_entries > 0 then begin
    emit_string code_space;
    emit_string code_space;
 Lines 741-749    Link Here 
  `	.data\n`;
  `	.data\n`;
  List.iter emit_item l
  List.iter emit_item l
(* Set the stack as non-executable *)
let nx_stack() =
  `#ifdef __ELF__\n`;
  `.section .note.GNU-stack,\"\",%progbits\n`;
  `#endif\n`
(* Beginning / end of an assembly file *)
(* Beginning / end of an assembly file *)
let begin_assembly() =
let begin_assembly() =
  nx_stack();
  let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
  let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
  `	.data\n`;
  `	.data\n`;
  `	.global	{emit_symbol lbl_begin}\n`;
  `	.global	{emit_symbol lbl_begin}\n`;