mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-23 16:35:02 +03:00
added double precision load/store
This commit is contained in:
parent
11affb8848
commit
45a898cf5d
@ -7,8 +7,14 @@ void _start() {
|
||||
float b=1.1; // r10
|
||||
float c=0.0;
|
||||
float *pointer = &res[0]; // r10
|
||||
double dres [] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
|
||||
double da = 41.221;
|
||||
double db = 11.11111;
|
||||
double dc = 0.0;
|
||||
double *dpointer = &dres[0];
|
||||
int idx1 = 4;
|
||||
int idx2 = 0;
|
||||
int idx3 = 8;
|
||||
|
||||
/* TEST: Load/store single precision D-form */
|
||||
asm ( " stfs %0,0(%2) \n"
|
||||
@ -27,12 +33,36 @@ void _start() {
|
||||
" stfsx %1,%2,%4 \n"
|
||||
" lfsx %1,%2,%3 \n"
|
||||
" lfsx %0,%2,%4 \n"
|
||||
" stfsux %0,%2,%3 \n"
|
||||
" stfsux %1,%2,%4 \n"
|
||||
" lfsux %1,%2,%3 \n"
|
||||
" lfsux %0,%2,%4 \n"
|
||||
" stfsux %0,%2,%3 \n"
|
||||
" stfsux %1,%2,%4 \n"
|
||||
" lfsux %1,%2,%3 \n"
|
||||
" lfsux %0,%2,%4 \n"
|
||||
: "+r"(a), "+r"(b)
|
||||
: "r"(pointer), "r"(idx1), "r"(idx2));
|
||||
|
||||
/* TEST: Load/store double precision D-form */
|
||||
asm ( " stfd %0,0(%2) \n"
|
||||
" stfd %1,4(%2) \n"
|
||||
" lfd %1,0(%2) \n"
|
||||
" lfd %0,4(%2) \n"
|
||||
" stfdu %0,0(%2) \n"
|
||||
" stfdu %1,4(%2) \n"
|
||||
" lfdu %1,-4(%2) \n"
|
||||
" lfdu %0,4(%2) \n"
|
||||
: "+r"(da), "+r"(db)
|
||||
: "r"(dpointer));
|
||||
|
||||
/* TEST: Load/store single precision X-form */
|
||||
asm ( " stfdx %0,%2,%3 \n"
|
||||
" stfdx %1,%2,%4 \n"
|
||||
" lfdx %1,%2,%3 \n"
|
||||
" lfdx %0,%2,%4 \n"
|
||||
" stfdux %0,%2,%3 \n"
|
||||
" stfdux %1,%2,%4 \n"
|
||||
" lfdux %1,%2,%3 \n"
|
||||
" lfdux %0,%2,%4 \n"
|
||||
: "+r"(da), "+r"(db)
|
||||
: "r"(dpointer), "r"(idx3), "r"(idx2));
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
Binary file not shown.
@ -12,14 +12,16 @@ _start:
|
||||
.type _start, @function
|
||||
.L._start:
|
||||
std 31,-8(1)
|
||||
stdu 1,-144(1)
|
||||
stdu 1,-256(1)
|
||||
mr 31,1
|
||||
xxlxor 32,32,32
|
||||
li 9,80
|
||||
stxvw4x 32,31,9
|
||||
xxlxor 32,32,32
|
||||
li 9,96
|
||||
stxvw4x 32,31,9
|
||||
li 9,0
|
||||
std 9,116(31)
|
||||
li 9,0
|
||||
std 9,124(31)
|
||||
li 9,0
|
||||
std 9,132(31)
|
||||
li 9,0
|
||||
std 9,140(31)
|
||||
addis 9,2,.LC0@toc@ha
|
||||
addi 9,9,.LC0@toc@l
|
||||
lfs 0,0(9)
|
||||
@ -30,21 +32,51 @@ _start:
|
||||
stfs 0,52(31)
|
||||
xxlxor 0,0,0
|
||||
stfs 0,56(31)
|
||||
addi 9,31,80
|
||||
addi 9,31,116
|
||||
std 9,64(31)
|
||||
li 9,4
|
||||
stw 9,72(31)
|
||||
li 9,0
|
||||
stw 9,76(31)
|
||||
std 9,152(31)
|
||||
li 9,0
|
||||
std 9,160(31)
|
||||
li 9,0
|
||||
std 9,168(31)
|
||||
li 9,0
|
||||
std 9,176(31)
|
||||
li 9,0
|
||||
std 9,184(31)
|
||||
li 9,0
|
||||
std 9,192(31)
|
||||
li 9,0
|
||||
std 9,200(31)
|
||||
li 9,0
|
||||
std 9,208(31)
|
||||
addis 9,2,.LC2@toc@ha
|
||||
addi 9,9,.LC2@toc@l
|
||||
lfd 0,0(9)
|
||||
stfd 0,72(31)
|
||||
addis 9,2,.LC3@toc@ha
|
||||
addi 9,9,.LC3@toc@l
|
||||
lfd 0,0(9)
|
||||
stfd 0,80(31)
|
||||
xxlxor 0,0,0
|
||||
stfd 0,88(31)
|
||||
addi 9,31,152
|
||||
std 9,96(31)
|
||||
li 9,4
|
||||
stw 9,104(31)
|
||||
li 9,0
|
||||
stw 9,108(31)
|
||||
li 9,8
|
||||
stw 9,112(31)
|
||||
ld 8,64(31)
|
||||
lfs 12,48(31)
|
||||
lfs 0,52(31)
|
||||
stfs 12,112(31)
|
||||
lwz 10,112(31)
|
||||
stfs 0,112(31)
|
||||
lwz 9,112(31)
|
||||
stfs 12,224(31)
|
||||
lwz 10,224(31)
|
||||
stfs 0,224(31)
|
||||
lwz 9,224(31)
|
||||
#APP
|
||||
# 14 "test-fp.c" 1
|
||||
# 20 "test-fp.c" 1
|
||||
stfs 10,0(8)
|
||||
stfs 9,4(8)
|
||||
lfs 9,0(8)
|
||||
@ -59,37 +91,83 @@ _start:
|
||||
stw 10,48(31)
|
||||
stw 9,52(31)
|
||||
ld 8,64(31)
|
||||
lwz 7,72(31)
|
||||
lwz 6,76(31)
|
||||
lwz 7,104(31)
|
||||
lwz 6,108(31)
|
||||
lfs 12,48(31)
|
||||
lfs 0,52(31)
|
||||
stfs 12,112(31)
|
||||
lwz 10,112(31)
|
||||
stfs 0,112(31)
|
||||
lwz 9,112(31)
|
||||
stfs 12,224(31)
|
||||
lwz 10,224(31)
|
||||
stfs 0,224(31)
|
||||
lwz 9,224(31)
|
||||
#APP
|
||||
# 26 "test-fp.c" 1
|
||||
# 32 "test-fp.c" 1
|
||||
stfsx 10,8,7
|
||||
stfsx 9,8,6
|
||||
lfsx 9,8,7
|
||||
lfsx 10,8,6
|
||||
stfsux 10,8,7
|
||||
stfsux 9,8,6
|
||||
lfsux 9,8,7
|
||||
lfsux 10,8,6
|
||||
stfsux 10,8,7
|
||||
stfsux 9,8,6
|
||||
lfsux 9,8,7
|
||||
lfsux 10,8,6
|
||||
|
||||
# 0 "" 2
|
||||
#NO_APP
|
||||
stw 10,48(31)
|
||||
stw 9,52(31)
|
||||
ld 8,96(31)
|
||||
lfd 12,72(31)
|
||||
lfd 0,80(31)
|
||||
stfd 12,232(31)
|
||||
ld 10,232(31)
|
||||
stfd 0,232(31)
|
||||
ld 9,232(31)
|
||||
#APP
|
||||
# 37 "test-fp.c" 1
|
||||
# 44 "test-fp.c" 1
|
||||
stfd 10,0(8)
|
||||
stfd 9,4(8)
|
||||
lfd 9,0(8)
|
||||
lfd 10,4(8)
|
||||
stfdu 10,0(8)
|
||||
stfdu 9,4(8)
|
||||
lfdu 9,-4(8)
|
||||
lfdu 10,4(8)
|
||||
|
||||
# 0 "" 2
|
||||
#NO_APP
|
||||
std 10,72(31)
|
||||
std 9,80(31)
|
||||
ld 8,96(31)
|
||||
lwz 7,112(31)
|
||||
lwz 6,108(31)
|
||||
lfd 12,72(31)
|
||||
lfd 0,80(31)
|
||||
stfd 12,232(31)
|
||||
ld 10,232(31)
|
||||
stfd 0,232(31)
|
||||
ld 9,232(31)
|
||||
#APP
|
||||
# 56 "test-fp.c" 1
|
||||
stfdx 10,8,7
|
||||
stfdx 9,8,6
|
||||
lfdx 9,8,7
|
||||
lfdx 10,8,6
|
||||
stfdux 10,8,7
|
||||
stfdux 9,8,6
|
||||
lfdux 9,8,7
|
||||
lfdux 10,8,6
|
||||
|
||||
# 0 "" 2
|
||||
#NO_APP
|
||||
std 10,72(31)
|
||||
std 9,80(31)
|
||||
#APP
|
||||
# 67 "test-fp.c" 1
|
||||
li 0,1
|
||||
sc
|
||||
# 0 "" 2
|
||||
#NO_APP
|
||||
nop
|
||||
addi 1,31,144
|
||||
addi 1,31,256
|
||||
ld 31,-8(1)
|
||||
blr
|
||||
.long 0
|
||||
@ -102,4 +180,12 @@ sc
|
||||
.align 2
|
||||
.LC1:
|
||||
.long 1066192077
|
||||
.align 3
|
||||
.LC2:
|
||||
.long 1078238281
|
||||
.long 3126736191
|
||||
.align 3
|
||||
.LC3:
|
||||
.long 1076246755
|
||||
.long 1760592994
|
||||
.ident "GCC: (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609"
|
||||
|
@ -1,3 +1,3 @@
|
||||
R { funcs = [(0x10000148, [(0x10000148, 252)])]
|
||||
, ignoreBlocks = [0x10000244]
|
||||
R { funcs = [(0x10000148, [(0x10000148, 524)])]
|
||||
, ignoreBlocks = [0x10000354]
|
||||
}
|
Loading…
Reference in New Issue
Block a user