hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a14fe44839ad6ee2cece80d49d20c43e687c2cc2
parent 7f170e5a4f0512d9ed5a4edbfa8536b22b7b5d56
Author: Ember Sawady <ecs@d2evs.net>
Date:   Sat, 20 May 2023 18:31:29 +0000

rt/*.s: use correct per-function sections

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mrt/+aarch64/fenv.s | 7+++++++
Mrt/+aarch64/getfp.s | 1+
Mrt/+aarch64/longjmp.s | 1+
Mrt/+aarch64/restore.s | 1+
Mrt/+aarch64/setjmp.s | 1+
Mrt/+riscv64/fenv.s | 5+++++
Mrt/+riscv64/getfp.s | 1+
Mrt/+riscv64/longjmp.s | 1+
Mrt/+riscv64/restore.s | 1+
Mrt/+riscv64/setjmp.s | 1+
Mrt/+x86_64/cpuid_native.s | 2++
Mrt/+x86_64/fenv.s | 5+++++
Mrt/+x86_64/getfp.s | 1+
Mrt/+x86_64/longjmp.s | 2++
Mrt/+x86_64/restore.s | 3++-
Mrt/+x86_64/setjmp.s | 2++
16 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/rt/+aarch64/fenv.s b/rt/+aarch64/fenv.s @@ -23,6 +23,7 @@ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ---------------------------------------------------------------------- +.section ".text.rt.fegetround","ax" .global rt.fegetround .type rt.fegetround,%function rt.fegetround: @@ -30,6 +31,7 @@ rt.fegetround: and w0, w0, #0xc00000 ret +.section ".text.rt.fesetround","ax" .global rt.fesetround .type rt.fesetround,%function rt.fesetround: @@ -40,6 +42,7 @@ rt.fesetround: mov w0, #0 ret +.section ".text.rt.fetestexcept","ax" .global rt.fetestexcept .type rt.fetestexcept,%function rt.fetestexcept: @@ -48,6 +51,7 @@ rt.fetestexcept: and w0, w0, w1 ret +.section ".text.rt.feclearexcept","ax" .global rt.feclearexcept .type rt.feclearexcept,%function rt.feclearexcept: @@ -58,6 +62,7 @@ rt.feclearexcept: mov w0, #0 ret +.section ".text.rt.feraiseexcept","ax" .global rt.feraiseexcept .type rt.feraiseexcept,%function rt.feraiseexcept: @@ -68,6 +73,7 @@ rt.feraiseexcept: mov w0, #0 ret +.section ".text.rt.fegetenv","ax" .global rt.fegetenv .type rt.fegetenv,%function rt.fegetenv: @@ -78,6 +84,7 @@ rt.fegetenv: ret // TODO preserve some bits +.section ".text.rt.fesetenv","ax" .global rt.fesetenv .type rt.fesetenv,%function rt.fesetenv: diff --git a/rt/+aarch64/getfp.s b/rt/+aarch64/getfp.s @@ -1,3 +1,4 @@ +.section ".text.rt.getfp","ax" .global rt.getfp .type rt.getfp,@function rt.getfp: diff --git a/rt/+aarch64/longjmp.s b/rt/+aarch64/longjmp.s @@ -1,3 +1,4 @@ +.section ".text.rt.longjmp","ax" .global rt.longjmp .type rt.longjmp,@function rt.longjmp: diff --git a/rt/+aarch64/restore.s b/rt/+aarch64/restore.s @@ -1,5 +1,6 @@ // Copied from musl +.section ".text.rt.restore","ax" .global rt.restore .global rt.restore_si .type rt.restore,@function diff --git a/rt/+aarch64/setjmp.s b/rt/+aarch64/setjmp.s @@ -1,3 +1,4 @@ +.section ".text.rt.setjmp","ax" .global rt.setjmp .type rt.setjmp,@function rt.setjmp: diff --git a/rt/+riscv64/fenv.s b/rt/+riscv64/fenv.s @@ -1,6 +1,7 @@ # License: MPL-2.0 # (c) 2022 Alexey Yerin <yyp@disroot.org> +.section ".text.rt.feclearexcept","ax" .global rt.feclearexcept .type rt.feclearexcept,@function rt.feclearexcept: @@ -12,6 +13,7 @@ rt.feclearexcept: fscsr t0 ret +.section ".text.rt.feraiseexcept","ax" .global rt.feraiseexcept .type rt.feraiseexcept,@function rt.feraiseexcept: @@ -22,18 +24,21 @@ rt.feraiseexcept: fscsr t0 ret +.section ".text.rt.fesetround","ax" .global rt.fesetround .type rt.fesetround,@function rt.fesetround: fsrm a0 ret +.section ".text.rt.fegetround","ax" .global rt.fegetround .type rt.fegetround,@function rt.fegetround: frrm a0 ret +.section ".text.rt.fetestexcept","ax" .global rt.fetestexcept .type rt.fetestexcept,@function rt.fetestexcept: diff --git a/rt/+riscv64/getfp.s b/rt/+riscv64/getfp.s @@ -1,3 +1,4 @@ +.section ".text.rt.getfp","ax" .global rt.getfp .type rt.getfp,@function rt.getfp: diff --git a/rt/+riscv64/longjmp.s b/rt/+riscv64/longjmp.s @@ -1,3 +1,4 @@ +.section ".text.rt.longjmp","ax" .global rt.longjmp .type rt.longjmp, %function rt.longjmp: diff --git a/rt/+riscv64/restore.s b/rt/+riscv64/restore.s @@ -1,3 +1,4 @@ +.section ".text.rt.restore","ax" .global rt.restore .type rt.restore, %function rt.restore: diff --git a/rt/+riscv64/setjmp.s b/rt/+riscv64/setjmp.s @@ -1,3 +1,4 @@ +.section ".text.rt.setjmp","ax" .global rt.setjmp .type rt.setjmp, %function rt.setjmp: diff --git a/rt/+x86_64/cpuid_native.s b/rt/+x86_64/cpuid_native.s @@ -1,3 +1,4 @@ +.section ".text.rt.cpuid_getvendorstr","ax" .global rt.cpuid_getvendorstr .type rt.cpuid_getvendorstr,@function rt.cpuid_getvendorstr: @@ -15,6 +16,7 @@ rt.cpuid_getvendorstr: popq %rdx ret +.section ".text.rt.cpuid_getfeatureflags","ax" .global rt.cpuid_getfeatureflags .type rt.cpuid_getfeatureflags,@function rt.cpuid_getfeatureflags: diff --git a/rt/+x86_64/fenv.s b/rt/+x86_64/fenv.s @@ -23,6 +23,7 @@ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ---------------------------------------------------------------------- +.section ".text.rt.feclearexcept","ax" .global rt.feclearexcept .type rt.feclearexcept,@function rt.feclearexcept: @@ -44,6 +45,7 @@ rt.feclearexcept: 1: xor %eax,%eax ret +.section ".text.rt.feraiseexcept","ax" .global rt.feraiseexcept .type rt.feraiseexcept,@function rt.feraiseexcept: @@ -54,6 +56,7 @@ rt.feraiseexcept: xor %eax,%eax ret +.section ".text.rt.fesetround","ax" .global rt.fesetround .type rt.fesetround,@function rt.fesetround: @@ -72,6 +75,7 @@ rt.fesetround: pop %rcx ret +.section ".text.rt.fegetround","ax" .global rt.fegetround .type rt.fegetround,@function rt.fegetround: @@ -82,6 +86,7 @@ rt.fegetround: and $0xc00,%eax ret +.section ".text.rt.fetestexcept","ax" .global rt.fetestexcept .type rt.fetestexcept,@function rt.fetestexcept: diff --git a/rt/+x86_64/getfp.s b/rt/+x86_64/getfp.s @@ -1,3 +1,4 @@ +.section ".text.rt.getfp","ax" .global rt.getfp .type rt.getfp,@function rt.getfp: diff --git a/rt/+x86_64/longjmp.s b/rt/+x86_64/longjmp.s @@ -1,4 +1,6 @@ /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */ + +.section ".text.rt.longjmp","ax" .global rt.longjmp .type rt.longjmp,@function rt.longjmp: diff --git a/rt/+x86_64/restore.s b/rt/+x86_64/restore.s @@ -1,5 +1,6 @@ -// Stolen from MUSL +// Copied from musl +.section ".text.rt.restore","ax" .global rt.restore .global rt.restore_si .type rt.restore,@function diff --git a/rt/+x86_64/setjmp.s b/rt/+x86_64/setjmp.s @@ -1,4 +1,6 @@ /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */ + +.section ".text.rt.setjmp","ax" .global rt.setjmp .type rt.setjmp,@function rt.setjmp: