72ad15
From 2e4038b6b8073f55012613f18cb19a4c99e8219d Mon Sep 17 00:00:00 2001
72ad15
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
72ad15
Date: Fri, 1 Dec 2017 14:39:46 +0100
72ad15
Subject: [PATCH 5/8] Copyright, untabify
72ad15
72ad15
---
72ad15
 asmrun/riscv.S | 608 ++++++++++++++++++++++++-------------------------
72ad15
 1 file changed, 304 insertions(+), 304 deletions(-)
72ad15
72ad15
diff --git a/asmrun/riscv.S b/asmrun/riscv.S
72ad15
index a82048efc..88d7ab924 100644
72ad15
--- a/asmrun/riscv.S
72ad15
+++ b/asmrun/riscv.S
72ad15
@@ -4,7 +4,7 @@
72ad15
 /*                                                                     */
72ad15
 /*               Nicolas Ojeda Bar <n.oje.bar@gmail.com>               */
72ad15
 /*                                                                     */
72ad15
-/*  Copyright 1996 Institut National de Recherche en Informatique et   */
72ad15
+/*  Copyright 2017 Institut National de Recherche en Informatique et   */
72ad15
 /*  en Automatique.  All rights reserved.  This file is distributed    */
72ad15
 /*  under the terms of the GNU Library General Public License, with    */
72ad15
 /*  the special exception on linking described in file ../LICENSE.     */
72ad15
@@ -37,388 +37,388 @@
72ad15
         .option nopic
72ad15
 #endif
72ad15
 
72ad15
-	.section	.text
72ad15
+        .section        .text
72ad15
 /* Invoke the garbage collector. */
72ad15
 
72ad15
-	.globl	caml_system__code_begin
72ad15
+        .globl  caml_system__code_begin
72ad15
 caml_system__code_begin:
72ad15
 
72ad15
-        .align	2
72ad15
-        .globl	caml_call_gc
72ad15
-        .type	caml_call_gc, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_call_gc
72ad15
+        .type   caml_call_gc, @function
72ad15
 caml_call_gc:
72ad15
         /* Record return address */
72ad15
-        store	ra, caml_last_return_address, TMP0
72ad15
+        store   ra, caml_last_return_address, TMP0
72ad15
         /* Record lowest stack address */
72ad15
-        mv	TMP1, sp
72ad15
-        store	sp, caml_bottom_of_stack, TMP0
72ad15
+        mv      TMP1, sp
72ad15
+        store   sp, caml_bottom_of_stack, TMP0
72ad15
 .Lcaml_call_gc:
72ad15
-	/* Set up stack space, saving return address */
72ad15
+        /* Set up stack space, saving return address */
72ad15
         /* (1 reg for RA, 1 reg for FP, 21 allocatable int regs, 20 caller-save float regs) * 8 */
72ad15
         /* + 1 for alignment */
72ad15
-        addi	sp, sp, -0x160
72ad15
-        mv	s0, sp
72ad15
-        store	ra, 0x8(sp)
72ad15
-        store	s0, 0x0(sp)
72ad15
+        addi    sp, sp, -0x160
72ad15
+        mv      s0, sp
72ad15
+        store   ra, 0x8(sp)
72ad15
+        store   s0, 0x0(sp)
72ad15
         /* Save allocatable integer registers on the stack,
72ad15
            in the order given in proc.ml */
72ad15
-        store	a0, 0x10(sp)
72ad15
-        store	a1, 0x18(sp)
72ad15
-        store	a2, 0x20(sp)
72ad15
-        store	a3, 0x28(sp)
72ad15
-        store	a4, 0x30(sp)
72ad15
-        store	a5, 0x38(sp)
72ad15
-        store	a6, 0x40(sp)
72ad15
-        store	a7, 0x48(sp)
72ad15
-        store	s2, 0x50(sp)
72ad15
-        store	s3, 0x58(sp)
72ad15
-        store	s4, 0x60(sp)
72ad15
-        store	s5, 0x68(sp)
72ad15
-        store	s6, 0x70(sp)
72ad15
-        store	s7, 0x78(sp)
72ad15
-        store	s8, 0x80(sp)
72ad15
-        store	s9, 0x88(sp)
72ad15
-        store	t2, 0x90(sp)
72ad15
-        store	t3, 0x98(sp)
72ad15
-        store	t4, 0xa0(sp)
72ad15
-        store	t5, 0xa8(sp)
72ad15
-        store	t6, 0xb0(sp)
72ad15
+        store   a0, 0x10(sp)
72ad15
+        store   a1, 0x18(sp)
72ad15
+        store   a2, 0x20(sp)
72ad15
+        store   a3, 0x28(sp)
72ad15
+        store   a4, 0x30(sp)
72ad15
+        store   a5, 0x38(sp)
72ad15
+        store   a6, 0x40(sp)
72ad15
+        store   a7, 0x48(sp)
72ad15
+        store   s2, 0x50(sp)
72ad15
+        store   s3, 0x58(sp)
72ad15
+        store   s4, 0x60(sp)
72ad15
+        store   s5, 0x68(sp)
72ad15
+        store   s6, 0x70(sp)
72ad15
+        store   s7, 0x78(sp)
72ad15
+        store   s8, 0x80(sp)
72ad15
+        store   s9, 0x88(sp)
72ad15
+        store   t2, 0x90(sp)
72ad15
+        store   t3, 0x98(sp)
72ad15
+        store   t4, 0xa0(sp)
72ad15
+        store   t5, 0xa8(sp)
72ad15
+        store   t6, 0xb0(sp)
72ad15
         /* Save caller-save floating-point registers on the stack
72ad15
            (callee-saves are preserved by caml_garbage_collection) */
72ad15
-        fsd	ft0, 0xb8(sp)
72ad15
-        fsd	ft1, 0xc0(sp)
72ad15
-        fsd	ft2, 0xc8(sp)
72ad15
-        fsd	ft3, 0xd0(sp)
72ad15
-        fsd	ft4, 0xd8(sp)
72ad15
-        fsd	ft5, 0xe0(sp)
72ad15
-        fsd	ft6, 0xe8(sp)
72ad15
-        fsd	ft7, 0xf0(sp)
72ad15
-        fsd	fa0, 0xf8(sp)
72ad15
-        fsd	fa1, 0x100(sp)
72ad15
-        fsd	fa2, 0x108(sp)
72ad15
-        fsd	fa3, 0x110(sp)
72ad15
-        fsd	fa4, 0x118(sp)
72ad15
-        fsd	fa5, 0x120(sp)
72ad15
-        fsd	fa6, 0x128(sp)
72ad15
-        fsd	fa7, 0x130(sp)
72ad15
-        fsd	ft8, 0x138(sp)
72ad15
-        fsd	ft9, 0x140(sp)
72ad15
-        fsd	ft9, 0x148(sp)
72ad15
-        fsd	ft10, 0x150(sp)
72ad15
-        fsd	ft11, 0x158(sp)
72ad15
+        fsd     ft0, 0xb8(sp)
72ad15
+        fsd     ft1, 0xc0(sp)
72ad15
+        fsd     ft2, 0xc8(sp)
72ad15
+        fsd     ft3, 0xd0(sp)
72ad15
+        fsd     ft4, 0xd8(sp)
72ad15
+        fsd     ft5, 0xe0(sp)
72ad15
+        fsd     ft6, 0xe8(sp)
72ad15
+        fsd     ft7, 0xf0(sp)
72ad15
+        fsd     fa0, 0xf8(sp)
72ad15
+        fsd     fa1, 0x100(sp)
72ad15
+        fsd     fa2, 0x108(sp)
72ad15
+        fsd     fa3, 0x110(sp)
72ad15
+        fsd     fa4, 0x118(sp)
72ad15
+        fsd     fa5, 0x120(sp)
72ad15
+        fsd     fa6, 0x128(sp)
72ad15
+        fsd     fa7, 0x130(sp)
72ad15
+        fsd     ft8, 0x138(sp)
72ad15
+        fsd     ft9, 0x140(sp)
72ad15
+        fsd     ft9, 0x148(sp)
72ad15
+        fsd     ft10, 0x150(sp)
72ad15
+        fsd     ft11, 0x158(sp)
72ad15
         /* Store pointer to saved integer registers in caml_gc_regs */
72ad15
-        addi	TMP1, sp, 16
72ad15
-        store	TMP1, caml_gc_regs, TMP0
72ad15
+        addi    TMP1, sp, 16
72ad15
+        store   TMP1, caml_gc_regs, TMP0
72ad15
         /* Save current allocation pointer for debugging purposes */
72ad15
-        store	ALLOC_PTR, caml_young_ptr, TMP0
72ad15
+        store   ALLOC_PTR, caml_young_ptr, TMP0
72ad15
         /* Save trap pointer in case an exception is raised during GC */
72ad15
-        store	TRAP_PTR, caml_exception_pointer, TMP0
72ad15
+        store   TRAP_PTR, caml_exception_pointer, TMP0
72ad15
         /* Call the garbage collector */
72ad15
-        call	caml_garbage_collection
72ad15
+        call    caml_garbage_collection
72ad15
         /* Restore registers */
72ad15
-        load	a0, 0x10(sp)
72ad15
-        load	a1, 0x18(sp)
72ad15
-        load	a2, 0x20(sp)
72ad15
-        load	a3, 0x28(sp)
72ad15
-        load	a4, 0x30(sp)
72ad15
-        load	a5, 0x38(sp)
72ad15
-        load	a6, 0x40(sp)
72ad15
-        load	a7, 0x48(sp)
72ad15
-        load	s2, 0x50(sp)
72ad15
-        load	s3, 0x58(sp)
72ad15
-        load	s4, 0x60(sp)
72ad15
-        load	s5, 0x68(sp)
72ad15
-        load	s6, 0x70(sp)
72ad15
-        load	s7, 0x78(sp)
72ad15
-        load	s8, 0x80(sp)
72ad15
-        load	s9, 0x88(sp)
72ad15
-        load	t2, 0x90(sp)
72ad15
-        load	t3, 0x98(sp)
72ad15
-        load	t4, 0xa0(sp)
72ad15
-        load	t5, 0xa8(sp)
72ad15
-        load	t6, 0xb0(sp)
72ad15
-        fld	ft0, 0xb8(sp)
72ad15
-        fld	ft1, 0xc0(sp)
72ad15
-        fld	ft2, 0xc8(sp)
72ad15
-        fld	ft3, 0xd0(sp)
72ad15
-        fld	ft4, 0xd8(sp)
72ad15
-        fld	ft5, 0xe0(sp)
72ad15
-        fld	ft6, 0xe8(sp)
72ad15
-        fld	ft7, 0xf0(sp)
72ad15
-        fld	fa0, 0xf8(sp)
72ad15
-        fld	fa1, 0x100(sp)
72ad15
-        fld	fa2, 0x108(sp)
72ad15
-        fld	fa3, 0x110(sp)
72ad15
-        fld	fa4, 0x118(sp)
72ad15
-        fld	fa5, 0x120(sp)
72ad15
-        fld	fa6, 0x128(sp)
72ad15
-        fld	fa7, 0x130(sp)
72ad15
-        fld	ft8, 0x138(sp)
72ad15
-        fld	ft9, 0x140(sp)
72ad15
-        fld	ft9, 0x148(sp)
72ad15
-        fld	ft10, 0x150(sp)
72ad15
-        fld	ft11, 0x158(sp)
72ad15
+        load    a0, 0x10(sp)
72ad15
+        load    a1, 0x18(sp)
72ad15
+        load    a2, 0x20(sp)
72ad15
+        load    a3, 0x28(sp)
72ad15
+        load    a4, 0x30(sp)
72ad15
+        load    a5, 0x38(sp)
72ad15
+        load    a6, 0x40(sp)
72ad15
+        load    a7, 0x48(sp)
72ad15
+        load    s2, 0x50(sp)
72ad15
+        load    s3, 0x58(sp)
72ad15
+        load    s4, 0x60(sp)
72ad15
+        load    s5, 0x68(sp)
72ad15
+        load    s6, 0x70(sp)
72ad15
+        load    s7, 0x78(sp)
72ad15
+        load    s8, 0x80(sp)
72ad15
+        load    s9, 0x88(sp)
72ad15
+        load    t2, 0x90(sp)
72ad15
+        load    t3, 0x98(sp)
72ad15
+        load    t4, 0xa0(sp)
72ad15
+        load    t5, 0xa8(sp)
72ad15
+        load    t6, 0xb0(sp)
72ad15
+        fld     ft0, 0xb8(sp)
72ad15
+        fld     ft1, 0xc0(sp)
72ad15
+        fld     ft2, 0xc8(sp)
72ad15
+        fld     ft3, 0xd0(sp)
72ad15
+        fld     ft4, 0xd8(sp)
72ad15
+        fld     ft5, 0xe0(sp)
72ad15
+        fld     ft6, 0xe8(sp)
72ad15
+        fld     ft7, 0xf0(sp)
72ad15
+        fld     fa0, 0xf8(sp)
72ad15
+        fld     fa1, 0x100(sp)
72ad15
+        fld     fa2, 0x108(sp)
72ad15
+        fld     fa3, 0x110(sp)
72ad15
+        fld     fa4, 0x118(sp)
72ad15
+        fld     fa5, 0x120(sp)
72ad15
+        fld     fa6, 0x128(sp)
72ad15
+        fld     fa7, 0x130(sp)
72ad15
+        fld     ft8, 0x138(sp)
72ad15
+        fld     ft9, 0x140(sp)
72ad15
+        fld     ft9, 0x148(sp)
72ad15
+        fld     ft10, 0x150(sp)
72ad15
+        fld     ft11, 0x158(sp)
72ad15
         /* Reload new allocation pointer and allocation limit */
72ad15
-        load	ALLOC_PTR, caml_young_ptr
72ad15
-        load	ALLOC_LIMIT, caml_young_limit
72ad15
+        load    ALLOC_PTR, caml_young_ptr
72ad15
+        load    ALLOC_LIMIT, caml_young_limit
72ad15
         /* Free stack space and return to caller */
72ad15
-        load	ra, 0x8(sp)
72ad15
-        load	s0, 0x0(sp)
72ad15
-        addi	sp, sp, 0x160
72ad15
+        load    ra, 0x8(sp)
72ad15
+        load    s0, 0x0(sp)
72ad15
+        addi    sp, sp, 0x160
72ad15
         ret
72ad15
-        .size	caml_call_gc, .-caml_call_gc
72ad15
+        .size   caml_call_gc, .-caml_call_gc
72ad15
 
72ad15
 /* Call a C function from OCaml */
72ad15
 /* Function to call is in ARG */
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_c_call
72ad15
-	.type	caml_c_call, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_c_call
72ad15
+        .type   caml_c_call, @function
72ad15
 caml_c_call:
72ad15
         /* Preserve return address in callee-save register s2 */
72ad15
-        mv	s2, ra
72ad15
+        mv      s2, ra
72ad15
         /* Record lowest stack address and return address */
72ad15
-        store	ra, caml_last_return_address, TMP0
72ad15
-        store	sp, caml_bottom_of_stack, TMP0
72ad15
+        store   ra, caml_last_return_address, TMP0
72ad15
+        store   sp, caml_bottom_of_stack, TMP0
72ad15
         /* Make the exception handler alloc ptr available to the C code */
72ad15
-        store	ALLOC_PTR, caml_young_ptr, TMP0
72ad15
-        store	TRAP_PTR, caml_exception_pointer, TMP0
72ad15
+        store   ALLOC_PTR, caml_young_ptr, TMP0
72ad15
+        store   TRAP_PTR, caml_exception_pointer, TMP0
72ad15
         /* Call the function */
72ad15
-        jalr	ARG
72ad15
+        jalr    ARG
72ad15
         /* Reload alloc ptr and alloc limit */
72ad15
-        load	ALLOC_PTR, caml_young_ptr
72ad15
-        load	TRAP_PTR, caml_exception_pointer
72ad15
+        load    ALLOC_PTR, caml_young_ptr
72ad15
+        load    TRAP_PTR, caml_exception_pointer
72ad15
         /* Return */
72ad15
-        jr	s2
72ad15
-        .size	caml_c_call, .-caml_c_call
72ad15
+        jr      s2
72ad15
+        .size   caml_c_call, .-caml_c_call
72ad15
 
72ad15
 /* Raise an exception from OCaml */
72ad15
-        .align	2
72ad15
-	.globl	caml_raise_exn
72ad15
-	.type	caml_raise_exn, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_raise_exn
72ad15
+        .type   caml_raise_exn, @function
72ad15
 caml_raise_exn:
72ad15
         /* Test if backtrace is active */
72ad15
-        load	TMP1, caml_backtrace_active
72ad15
-        bnez	TMP1, 2f
72ad15
+        load    TMP1, caml_backtrace_active
72ad15
+        bnez    TMP1, 2f
72ad15
 1:      /* Cut stack at current trap handler */
72ad15
-        mv	sp, TRAP_PTR
72ad15
+        mv      sp, TRAP_PTR
72ad15
         /* Pop previous handler and jump to it */
72ad15
-        load	TMP1, 8(sp)
72ad15
-        load	TRAP_PTR, 0(sp)
72ad15
-        addi	sp, sp, 16
72ad15
-        jr	TMP1
72ad15
+        load    TMP1, 8(sp)
72ad15
+        load    TRAP_PTR, 0(sp)
72ad15
+        addi    sp, sp, 16
72ad15
+        jr      TMP1
72ad15
 2:      /* Preserve exception bucket in callee-save register s2 */
72ad15
-        mv	s2, a0
72ad15
+        mv      s2, a0
72ad15
         /* Stash the backtrace */
72ad15
-        mv	a1, ra
72ad15
-        mv	a2, sp
72ad15
-        mv	a3, TRAP_PTR
72ad15
-        call	caml_stash_backtrace
72ad15
+        mv      a1, ra
72ad15
+        mv      a2, sp
72ad15
+        mv      a3, TRAP_PTR
72ad15
+        call    caml_stash_backtrace
72ad15
         /* Restore exception bucket and raise */
72ad15
-        mv	a0, s2
72ad15
-        j	1b
72ad15
-        .size	caml_raise_exn, .-caml_raise_exn
72ad15
+        mv      a0, s2
72ad15
+        j       1b
72ad15
+        .size   caml_raise_exn, .-caml_raise_exn
72ad15
 
72ad15
-	.globl	caml_reraise_exn
72ad15
-	.type	caml_reraise_exn, @function
72ad15
+        .globl  caml_reraise_exn
72ad15
+        .type   caml_reraise_exn, @function
72ad15
 
72ad15
 /* Raise an exception from C */
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_raise_exception
72ad15
-	.type	caml_raise_exception, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_raise_exception
72ad15
+        .type   caml_raise_exception, @function
72ad15
 caml_raise_exception:
72ad15
-	load	TRAP_PTR, caml_exception_pointer
72ad15
-        load	ALLOC_PTR, caml_young_ptr
72ad15
-        load	ALLOC_LIMIT, caml_young_limit
72ad15
-        load	TMP1, caml_backtrace_active
72ad15
-        bnez	TMP1, 2f
72ad15
+        load    TRAP_PTR, caml_exception_pointer
72ad15
+        load    ALLOC_PTR, caml_young_ptr
72ad15
+        load    ALLOC_LIMIT, caml_young_limit
72ad15
+        load    TMP1, caml_backtrace_active
72ad15
+        bnez    TMP1, 2f
72ad15
 1:      /* Cut stack at current trap handler */
72ad15
-        mv	sp, TRAP_PTR
72ad15
-        load	TMP1, 8(sp)
72ad15
-        load	TRAP_PTR, 0(sp)
72ad15
-        addi	sp, sp, 16
72ad15
-        jr	TMP1
72ad15
+        mv      sp, TRAP_PTR
72ad15
+        load    TMP1, 8(sp)
72ad15
+        load    TRAP_PTR, 0(sp)
72ad15
+        addi    sp, sp, 16
72ad15
+        jr      TMP1
72ad15
 2:      /* Preserve exception bucket in callee-save register s2 */
72ad15
-        mv	s2, a0
72ad15
-        load	a1, caml_last_return_address
72ad15
-        load	a2, caml_bottom_of_stack
72ad15
-        mv	a3, TRAP_PTR
72ad15
-        call	caml_stash_backtrace
72ad15
-        mv	a0, s2
72ad15
-        j	1b
72ad15
-        .size	caml_raise_exception, .-caml_raise_exception
72ad15
+        mv      s2, a0
72ad15
+        load    a1, caml_last_return_address
72ad15
+        load    a2, caml_bottom_of_stack
72ad15
+        mv      a3, TRAP_PTR
72ad15
+        call    caml_stash_backtrace
72ad15
+        mv      a0, s2
72ad15
+        j       1b
72ad15
+        .size   caml_raise_exception, .-caml_raise_exception
72ad15
 
72ad15
 /* Start the OCaml program */
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_start_program
72ad15
-	.type	caml_start_program, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_start_program
72ad15
+        .type   caml_start_program, @function
72ad15
 caml_start_program:
72ad15
 
72ad15
-        la	ARG, caml_program
72ad15
+        la      ARG, caml_program
72ad15
         /* Code shared with caml_callback* */
72ad15
         /* Address of OCaml code to call is in ARG */
72ad15
         /* Arguments to the OCaml code are in a0 ... a7 */
72ad15
 .Ljump_to_caml:
72ad15
-	/* Set up stack frame and save callee-save registers */
72ad15
-	addi	sp, sp, -0xd0
72ad15
-	store	ra, 0xc0(sp)
72ad15
-	store	s0, 0x0(sp)
72ad15
-	store	s1, 0x8(sp)
72ad15
-	store	s2, 0x10(sp)
72ad15
-	store	s3, 0x18(sp)
72ad15
-	store	s4, 0x20(sp)
72ad15
-	store	s5, 0x28(sp)
72ad15
-	store	s6, 0x30(sp)
72ad15
-	store	s7, 0x38(sp)
72ad15
-	store	s8, 0x40(sp)
72ad15
-	store	s9, 0x48(sp)
72ad15
-	store	s10, 0x50(sp)
72ad15
-	store	s11, 0x58(sp)
72ad15
-	fsd	fs0, 0x60(sp)
72ad15
-	fsd	fs1, 0x68(sp)
72ad15
-	fsd	fs2, 0x70(sp)
72ad15
-	fsd	fs3, 0x78(sp)
72ad15
-	fsd	fs4, 0x80(sp)
72ad15
-	fsd	fs5, 0x88(sp)
72ad15
-	fsd	fs6, 0x90(sp)
72ad15
-	fsd	fs7, 0x98(sp)
72ad15
-	fsd	fs8, 0xa0(sp)
72ad15
-	fsd	fs9, 0xa8(sp)
72ad15
-	fsd	fs10, 0xb0(sp)
72ad15
-	fsd	fs11, 0xb8(sp)
72ad15
-	addi	sp, sp, -32
72ad15
+        /* Set up stack frame and save callee-save registers */
72ad15
+        addi    sp, sp, -0xd0
72ad15
+        store   ra, 0xc0(sp)
72ad15
+        store   s0, 0x0(sp)
72ad15
+        store   s1, 0x8(sp)
72ad15
+        store   s2, 0x10(sp)
72ad15
+        store   s3, 0x18(sp)
72ad15
+        store   s4, 0x20(sp)
72ad15
+        store   s5, 0x28(sp)
72ad15
+        store   s6, 0x30(sp)
72ad15
+        store   s7, 0x38(sp)
72ad15
+        store   s8, 0x40(sp)
72ad15
+        store   s9, 0x48(sp)
72ad15
+        store   s10, 0x50(sp)
72ad15
+        store   s11, 0x58(sp)
72ad15
+        fsd     fs0, 0x60(sp)
72ad15
+        fsd     fs1, 0x68(sp)
72ad15
+        fsd     fs2, 0x70(sp)
72ad15
+        fsd     fs3, 0x78(sp)
72ad15
+        fsd     fs4, 0x80(sp)
72ad15
+        fsd     fs5, 0x88(sp)
72ad15
+        fsd     fs6, 0x90(sp)
72ad15
+        fsd     fs7, 0x98(sp)
72ad15
+        fsd     fs8, 0xa0(sp)
72ad15
+        fsd     fs9, 0xa8(sp)
72ad15
+        fsd     fs10, 0xb0(sp)
72ad15
+        fsd     fs11, 0xb8(sp)
72ad15
+        addi    sp, sp, -32
72ad15
         /* Setup a callback link on the stack */
72ad15
-	load	TMP1, caml_bottom_of_stack
72ad15
-	store	TMP1, 0(sp)
72ad15
-	load	TMP1, caml_last_return_address
72ad15
-	store	TMP1, 8(sp)
72ad15
-	load	TMP1, caml_gc_regs
72ad15
-	store	TMP1, 16(sp)
72ad15
-	/* set up a trap frame */
72ad15
-	addi	sp, sp, -16
72ad15
-	load	TMP1, caml_exception_pointer
72ad15
-	store	TMP1, 0(sp)
72ad15
-	lla	TMP0, .Ltrap_handler
72ad15
-	store	TMP0, 8(sp)
72ad15
-	mv	TRAP_PTR, sp
72ad15
-	load	ALLOC_PTR, caml_young_ptr
72ad15
-	load	ALLOC_LIMIT, caml_young_limit
72ad15
-	store	x0, caml_last_return_address, TMP0
72ad15
-	jalr	ARG
72ad15
-.Lcaml_retaddr:	/* pop trap frame, restoring caml_exception_pointer */
72ad15
-	load	TMP1, 0(sp)
72ad15
-	store	TMP1, caml_exception_pointer, TMP0
72ad15
-	addi	sp, sp, 16
72ad15
-.Lreturn_result:	/* pop callback link, restoring global variables */
72ad15
-	load	TMP1, 0(sp)
72ad15
-	store	TMP1, caml_bottom_of_stack, TMP0
72ad15
-	load	TMP1, 8(sp)
72ad15
-	store	TMP1, caml_last_return_address, TMP0
72ad15
-	load	TMP1, 16(sp)
72ad15
-	store	TMP1, caml_gc_regs, TMP0
72ad15
-	addi	sp, sp, 32
72ad15
-	/* Update allocation pointer */
72ad15
-	store	ALLOC_PTR, caml_young_ptr, TMP0
72ad15
-	/* reload callee-save registers and return */
72ad15
-	load	ra, 0xc0(sp)
72ad15
-	load	s0, 0x0(sp)
72ad15
-	load	s1, 0x8(sp)
72ad15
-	load	s2, 0x10(sp)
72ad15
-	load	s3, 0x18(sp)
72ad15
-	load	s4, 0x20(sp)
72ad15
-	load	s5, 0x28(sp)
72ad15
-	load	s6, 0x30(sp)
72ad15
-	load	s7, 0x38(sp)
72ad15
-	load	s8, 0x40(sp)
72ad15
-	load	s9, 0x48(sp)
72ad15
-	load	s10, 0x50(sp)
72ad15
-	load	s11, 0x58(sp)
72ad15
-	fld	fs0, 0x60(sp)
72ad15
-	fld	fs1, 0x68(sp)
72ad15
-	fld	fs2, 0x70(sp)
72ad15
-	fld	fs3, 0x78(sp)
72ad15
-	fld	fs4, 0x80(sp)
72ad15
-	fld	fs5, 0x88(sp)
72ad15
-	fld	fs6, 0x90(sp)
72ad15
-	fld	fs7, 0x98(sp)
72ad15
-	fld	fs8, 0xa0(sp)
72ad15
-	fld	fs9, 0xa8(sp)
72ad15
-	fld	fs10, 0xb0(sp)
72ad15
-	fld	fs11, 0xb8(sp)
72ad15
-	addi	sp, sp, 0xd0
72ad15
-	ret
72ad15
+        load    TMP1, caml_bottom_of_stack
72ad15
+        store   TMP1, 0(sp)
72ad15
+        load    TMP1, caml_last_return_address
72ad15
+        store   TMP1, 8(sp)
72ad15
+        load    TMP1, caml_gc_regs
72ad15
+        store   TMP1, 16(sp)
72ad15
+        /* set up a trap frame */
72ad15
+        addi    sp, sp, -16
72ad15
+        load    TMP1, caml_exception_pointer
72ad15
+        store   TMP1, 0(sp)
72ad15
+        lla     TMP0, .Ltrap_handler
72ad15
+        store   TMP0, 8(sp)
72ad15
+        mv      TRAP_PTR, sp
72ad15
+        load    ALLOC_PTR, caml_young_ptr
72ad15
+        load    ALLOC_LIMIT, caml_young_limit
72ad15
+        store   x0, caml_last_return_address, TMP0
72ad15
+        jalr    ARG
72ad15
+.Lcaml_retaddr:         /* pop trap frame, restoring caml_exception_pointer */
72ad15
+        load    TMP1, 0(sp)
72ad15
+        store   TMP1, caml_exception_pointer, TMP0
72ad15
+        addi    sp, sp, 16
72ad15
+.Lreturn_result:        /* pop callback link, restoring global variables */
72ad15
+        load    TMP1, 0(sp)
72ad15
+        store   TMP1, caml_bottom_of_stack, TMP0
72ad15
+        load    TMP1, 8(sp)
72ad15
+        store   TMP1, caml_last_return_address, TMP0
72ad15
+        load    TMP1, 16(sp)
72ad15
+        store   TMP1, caml_gc_regs, TMP0
72ad15
+        addi    sp, sp, 32
72ad15
+        /* Update allocation pointer */
72ad15
+        store   ALLOC_PTR, caml_young_ptr, TMP0
72ad15
+        /* reload callee-save registers and return */
72ad15
+        load    ra, 0xc0(sp)
72ad15
+        load    s0, 0x0(sp)
72ad15
+        load    s1, 0x8(sp)
72ad15
+        load    s2, 0x10(sp)
72ad15
+        load    s3, 0x18(sp)
72ad15
+        load    s4, 0x20(sp)
72ad15
+        load    s5, 0x28(sp)
72ad15
+        load    s6, 0x30(sp)
72ad15
+        load    s7, 0x38(sp)
72ad15
+        load    s8, 0x40(sp)
72ad15
+        load    s9, 0x48(sp)
72ad15
+        load    s10, 0x50(sp)
72ad15
+        load    s11, 0x58(sp)
72ad15
+        fld     fs0, 0x60(sp)
72ad15
+        fld     fs1, 0x68(sp)
72ad15
+        fld     fs2, 0x70(sp)
72ad15
+        fld     fs3, 0x78(sp)
72ad15
+        fld     fs4, 0x80(sp)
72ad15
+        fld     fs5, 0x88(sp)
72ad15
+        fld     fs6, 0x90(sp)
72ad15
+        fld     fs7, 0x98(sp)
72ad15
+        fld     fs8, 0xa0(sp)
72ad15
+        fld     fs9, 0xa8(sp)
72ad15
+        fld     fs10, 0xb0(sp)
72ad15
+        fld     fs11, 0xb8(sp)
72ad15
+        addi    sp, sp, 0xd0
72ad15
+        ret
72ad15
 .Ltrap_handler:
72ad15
-	store	TRAP_PTR, caml_exception_pointer, TMP0
72ad15
-	ori	a0, a0, 2
72ad15
-	j	.Lreturn_result
72ad15
-	.size	caml_start_program, .-caml_start_program
72ad15
+        store   TRAP_PTR, caml_exception_pointer, TMP0
72ad15
+        ori     a0, a0, 2
72ad15
+        j       .Lreturn_result
72ad15
+        .size   caml_start_program, .-caml_start_program
72ad15
 
72ad15
 /* Callback from C to OCaml */
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_callback_exn
72ad15
-	.type	caml_callback_exn, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_callback_exn
72ad15
+        .type   caml_callback_exn, @function
72ad15
 caml_callback_exn:
72ad15
         /* Initial shuffling of arguments (a0 = closure, a1 = first arg) */
72ad15
-        mv	TMP1, a0
72ad15
-        mv	a0, a1		/* a0 = first arg */
72ad15
-        mv	a1, TMP1	/* a1 = closure environment */
72ad15
-        load	ARG, 0(TMP1)	/* code pointer */
72ad15
-        j	.Ljump_to_caml
72ad15
-        .size	caml_callback_exn, .-caml_callback_exn
72ad15
+        mv      TMP1, a0
72ad15
+        mv      a0, a1          /* a0 = first arg */
72ad15
+        mv      a1, TMP1        /* a1 = closure environment */
72ad15
+        load    ARG, 0(TMP1)    /* code pointer */
72ad15
+        j       .Ljump_to_caml
72ad15
+        .size   caml_callback_exn, .-caml_callback_exn
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_callback2_exn
72ad15
-	.type	caml_callback2_exn, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_callback2_exn
72ad15
+        .type   caml_callback2_exn, @function
72ad15
 caml_callback2_exn:
72ad15
         /* Initial shuffling of arguments (a0 = closure, a1 = arg1, a2 = arg2) */
72ad15
-        mv	TMP1, a0
72ad15
-        mv	a0, a1
72ad15
-        mv	a1, a2
72ad15
-        mv	a2, TMP1
72ad15
-        la	ARG, caml_apply2
72ad15
-        j	.Ljump_to_caml
72ad15
-        .size	caml_callback2_exn, .-caml_callback2_exn
72ad15
+        mv      TMP1, a0
72ad15
+        mv      a0, a1
72ad15
+        mv      a1, a2
72ad15
+        mv      a2, TMP1
72ad15
+        la      ARG, caml_apply2
72ad15
+        j       .Ljump_to_caml
72ad15
+        .size   caml_callback2_exn, .-caml_callback2_exn
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_callback3_exn
72ad15
-	.type	caml_callback3_exn, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_callback3_exn
72ad15
+        .type   caml_callback3_exn, @function
72ad15
 caml_callback3_exn:
72ad15
         /* Initial shuffling of argumnets */
72ad15
         /* (a0 = closure, a1 = arg1, a2 = arg2, a3 = arg3) */
72ad15
-        mv	TMP1, a0
72ad15
-        mv	a0, a1
72ad15
-        mv	a1, a2
72ad15
-        mv	a2, a3
72ad15
-        mv	a3, TMP1
72ad15
-        la	ARG, caml_apply3
72ad15
-        j	.Ljump_to_caml
72ad15
-        .size	caml_callback3_exn, .-caml_callback3_exn
72ad15
+        mv      TMP1, a0
72ad15
+        mv      a0, a1
72ad15
+        mv      a1, a2
72ad15
+        mv      a2, a3
72ad15
+        mv      a3, TMP1
72ad15
+        la      ARG, caml_apply3
72ad15
+        j       .Ljump_to_caml
72ad15
+        .size   caml_callback3_exn, .-caml_callback3_exn
72ad15
 
72ad15
-        .align	2
72ad15
-	.globl	caml_ml_array_bound_error
72ad15
-	.type	caml_ml_array_bound_error, @function
72ad15
+        .align  2
72ad15
+        .globl  caml_ml_array_bound_error
72ad15
+        .type   caml_ml_array_bound_error, @function
72ad15
 caml_ml_array_bound_error:
72ad15
         /* Load address of [caml_array_bound_error] in ARG */
72ad15
-        la	ARG, caml_array_bound_error
72ad15
+        la      ARG, caml_array_bound_error
72ad15
         /* Call that function */
72ad15
-        j	caml_c_call
72ad15
+        j       caml_c_call
72ad15
 
72ad15
-	.globl	caml_system__code_end
72ad15
+        .globl  caml_system__code_end
72ad15
 caml_system__code_end:
72ad15
 
72ad15
 /* GC roots for callback */
72ad15
 
72ad15
-	.section .data
72ad15
-        .align	3
72ad15
-	.globl	caml_system__frametable
72ad15
-	.type	caml_system__frametable, @object
72ad15
+        .section .data
72ad15
+        .align  3
72ad15
+        .globl  caml_system__frametable
72ad15
+        .type   caml_system__frametable, @object
72ad15
 caml_system__frametable:
72ad15
-	.quad	1		/* one descriptor */
72ad15
-	.quad	.Lcaml_retaddr  /* return address into callback */
72ad15
-	.short	-1		/* negative frame size => use callback link */
72ad15
-	.short	0		/* no roots */
72ad15
-	.align	3
72ad15
-	.size	caml_system__frametable, .-caml_system__frametable
72ad15
+        .quad   1               /* one descriptor */
72ad15
+        .quad   .Lcaml_retaddr  /* return address into callback */
72ad15
+        .short  -1              /* negative frame size => use callback link */
72ad15
+        .short  0               /* no roots */
72ad15
+        .align  3
72ad15
+        .size   caml_system__frametable, .-caml_system__frametable
72ad15
-- 
72ad15
2.17.1
72ad15