Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm Do previo...
details: https://anonhg.NetBSD.org/src/rev/6920478df2b8
branches: trunk
changeset: 1022047:6920478df2b8
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Jun 30 21:18:00 2021 +0000
description:
Do previous differently by pushing even number of registers and remove
strange r7 usage.
diffstat:
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S | 16 +++------
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S | 7 +---
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S | 7 +---
sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S | 7 +---
4 files changed, 12 insertions(+), 25 deletions(-)
diffs (103 lines):
diff -r 3f7936d9c072 -r 6920478df2b8 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S
--- a/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S Wed Jun 30 20:00:18 2021 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S Wed Jun 30 21:18:00 2021 +0000
@@ -27,12 +27,11 @@
.syntax unified
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq)
- push {r0-r3, lr}
- sub sp, #4
+ // Save ip to ensure stack alignment (could be any register)
+ push {r0-r3, ip, lr}
bl __aeabi_cfcmpeq_check_nan
cmp r0, #1
- add sp, #4
- pop {r0-r3, lr}
+ pop {r0-r3, ip, lr}
// NaN has been ruled out, so __aeabi_cfcmple can't trap
bne __aeabi_cfcmple
@@ -57,17 +56,15 @@
DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmple)
// Per the RTABI, this function must preserve r0-r11.
// Save lr in the same instruction for compactness
- push {r0-r3, lr}
- sub sp, #4
+ // Save ip to ensure stack alignment (could be any register)
+ push {r0-r3, ip, lr}
bl __aeabi_fcmplt
cmp r0, #1
moveq ip, #0
beq 1f
- add sp, #4
ldm sp, {r0-r3}
- sub sp, #4
bl __aeabi_fcmpeq
cmp r0, #1
moveq ip, #(APSR_C | APSR_Z)
@@ -75,8 +72,7 @@
1:
msr CPSR_f, ip
- add sp, #4
- pop {r0-r3}
+ pop {r0-r3, ip}
POP_PC()
END_COMPILERRT_FUNCTION(__aeabi_cfcmple)
diff -r 3f7936d9c072 -r 6920478df2b8 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S
--- a/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S Wed Jun 30 20:00:18 2021 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S Wed Jun 30 21:18:00 2021 +0000
@@ -16,12 +16,9 @@
#include "../assembly.h"
#define ESTABLISH_FRAME \
- push {r4-r7, lr} ;\
- add r7, sp, #12 ;\
- sub sp, #4
+ push {r4-r6, lr}
#define CLEAR_FRAME_AND_RETURN \
- add sp, #4 ;\
- pop {r4-r7, pc}
+ pop {r4-r6, pc}
.syntax unified
.text
diff -r 3f7936d9c072 -r 6920478df2b8 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S Wed Jun 30 20:00:18 2021 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S Wed Jun 30 21:18:00 2021 +0000
@@ -15,12 +15,9 @@
#include "../assembly.h"
#define ESTABLISH_FRAME \
- push {r4, r7, lr} ;\
- add r7, sp, #4 ;\
- sub sp, #4
+ push {r4, lr}
#define CLEAR_FRAME_AND_RETURN \
- add sp, #4 ;\
- pop {r4, r7, pc}
+ pop {r4, pc}
.syntax unified
.text
diff -r 3f7936d9c072 -r 6920478df2b8 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Wed Jun 30 20:00:18 2021 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Wed Jun 30 21:18:00 2021 +0000
@@ -15,12 +15,9 @@
#include "../assembly.h"
#define ESTABLISH_FRAME \
- push {r4, r7, lr} ;\
- add r7, sp, #4 ;\
- sub sp, #4
+ push {r4, lr}
#define CLEAR_FRAME_AND_RETURN \
- add sp, #4 ;\
- pop {r4, r7, pc}
+ pop {r4, pc}
.syntax unified
.text
Home |
Main Index |
Thread Index |
Old Index