mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
PUSH+POP now in macros.S
This commit is contained in:
parent
9cb8fbf178
commit
16241d010f
|
@ -29,6 +29,17 @@
|
|||
|
||||
.altmacro
|
||||
|
||||
#define PUSH1(r1) str r1, [sp,#-1*8]!
|
||||
#define PUSH2(r1,r2) stp r1,r2,[sp,#-2*8]!
|
||||
#define PUSH3(r1,r2,r3) stp r1,r2,[sp,#-3*8]!; str r3, [sp,#2*8]
|
||||
#define PUSH4(r1,r2,r3,r4) stp r1,r2,[sp,#-4*8]!; stp r3,r4,[sp,#2*8]
|
||||
#define PUSH5(r1,r2,r3,r4,r5) PUSH2(r4,r5); PUSH3(r1,r2,r3)
|
||||
|
||||
#define POP1(r1) ldr r1, [sp],#1*8
|
||||
#define POP2(r1,r2) ldp r1,r2,[sp],#2*8
|
||||
#define POP3(r1,r2,r3) ldr r3, [sp,#2*8]; ldp r1,r2,[sp],#3*8
|
||||
#define POP4(r1,r2,r3,r4) ldp r3,r4,[sp,#2*8]; ldp r1,r2,[sp],#4*8
|
||||
|
||||
.macro section name
|
||||
.section \name
|
||||
.endm
|
||||
|
@ -105,10 +116,6 @@ __NR_SYSCALL_BASE = 0x900000
|
|||
.endm
|
||||
#endif /*}*/
|
||||
|
||||
.macro ret
|
||||
br lr /* armv5 for thumb interworking */
|
||||
.endm
|
||||
|
||||
.macro loadcon8 reg,val8
|
||||
.long (0xe3<<24)|(0xa0<<16)|((\reg<<4)<<8)+(\val8) /* mov \reg,#\val8 */
|
||||
.endm
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
#define off w5
|
||||
|
||||
/* macros reduce "noise" when comparing this ARM code to corresponding THUMB code */
|
||||
#define PUSH1(r1) str r1, [sp,#-1*8]!
|
||||
#define PUSH2(r1,r2) stp r1,r2,[sp,#-2*8]!
|
||||
#define PUSH4(r1,r2,r3,r4) stp r1,r2,[sp,#-4*8]!; stp r3,r4,[sp,#2*8]
|
||||
#define POP2(r1,r2) ldp r1,r2,[sp],#2*8
|
||||
#define POP3(r1,r2,r3) ldr r3,[sp,#2*8]; ldp r1,r2,[sp],#3*8
|
||||
#define ADD2( dst,src) add dst,dst,src
|
||||
#define ADD2S(dst,src) adds dst,dst,src
|
||||
#define ADC2( dst,src) adc dst,dst,src
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
#define cnt w1 /* overlaps 'len' while reading an offset */
|
||||
|
||||
/* macros reduce "noise" when comparing this ARM code to corresponding THUMB code */
|
||||
#define PUSH2(r1,r2) stp r1,r2,[sp,#-2*8]!
|
||||
#define POP2(r1,r2) ldp r1,r2,[sp],#2*8
|
||||
#define PUSH3(r1,r2,r3) stp r1,r2,[sp,#-3*8]!; str r3,[sp,#2*8]
|
||||
|
||||
#define ADD2( dst,src) add dst,dst,src
|
||||
#define ADD2S(dst,src) adds dst,dst,src
|
||||
#define ADC2( dst,src) adc dst,dst,src
|
||||
|
|
|
@ -49,9 +49,6 @@
|
|||
#define cnt w1 /* overlaps 'len' while reading an offset */
|
||||
|
||||
/* macros reduce "noise" when comparing this ARM code to corresponding THUMB code */
|
||||
#define PUSH2(r1,r2) stp r1,r2,[sp,#-2*8]!
|
||||
#define PUSH3(r1,r2,r3) stp r1,r2,[sp,#-3*8]!; str r3,[sp,#2*8]
|
||||
#define POP2(r1,r2) ldp r1,r2,[sp],#2*8
|
||||
#define ADD2( dst,src) add dst,dst,src
|
||||
#define ADD2S(dst,src) adds dst,dst,src
|
||||
#define ADC2( dst,src) adc dst,dst,src
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
#define cnt w1 /* overlaps 'len' while reading an offset */
|
||||
|
||||
/* macros reduce "noise" when comparing this ARM code to corresponding THUMB code */
|
||||
#define PUSH2(r1,r2) stp r1,r2,[sp,#-2*8]!
|
||||
#define PUSH3(r1,r2,r3) stp r1,r2,[sp,#-3*8]!; str r3,[sp,#2*8]
|
||||
#define POP2(r1,r2) ldp r1,r2,[sp],#2*8
|
||||
#define POP1(r1) ldr r1, [sp],# 8
|
||||
#define ADD2( dst,src) add dst,dst,src
|
||||
#define ADD2S(dst,src) adds dst,dst,src
|
||||
#define ADC2( dst,src) adc dst,dst,src
|
||||
|
|
Loading…
Reference in New Issue
Block a user