diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-30 02:02:17 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-30 02:02:17 +0000 |
commit | 18c9b56060e6d69e38d0d91ffb02d510d8ce1971 (patch) | |
tree | 9d47bc9c28811fa847a85f845fa62c8e418a435b /tests | |
parent | a171fe394a82e3a2dad76e901959d859b1966541 (diff) | |
download | hqemu-18c9b56060e6d69e38d0d91ffb02d510d8ce1971.zip hqemu-18c9b56060e6d69e38d0d91ffb02d510d8ce1971.tar.gz |
Implement iwMMXt instruction set for the PXA270 cpu.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2752 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 3 | ||||
-rw-r--r-- | tests/test-arm-iwmmxt.s | 49 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile index 79a3d55..ec3a93c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -82,6 +82,9 @@ hello-arm: hello-arm.o hello-arm.o: hello-arm.c arm-linux-gcc -Wall -g -O2 -c -o $@ $< +test-arm-iwmmxt: test-arm-iwmmxt.s + cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@ + # MIPS test hello-mips: hello-mips.c mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $< diff --git a/tests/test-arm-iwmmxt.s b/tests/test-arm-iwmmxt.s new file mode 100644 index 0000000..d647f94 --- /dev/null +++ b/tests/test-arm-iwmmxt.s @@ -0,0 +1,49 @@ +@ Checks whether iwMMXt is functional. +.code 32 +.globl main + +main: +ldr r0, =data0 +ldr r1, =data1 +ldr r2, =data2 +#ifndef FPA +wldrd wr0, [r0, #0] +wldrd wr1, [r0, #8] +wldrd wr2, [r1, #0] +wldrd wr3, [r1, #8] +wsubb wr2, wr2, wr0 +wsubb wr3, wr3, wr1 +wldrd wr0, [r2, #0] +wldrd wr1, [r2, #8] +waddb wr0, wr0, wr2 +waddb wr1, wr1, wr3 +wstrd wr0, [r2, #0] +wstrd wr1, [r2, #8] +#else +ldfe f0, [r0, #0] +ldfe f1, [r0, #8] +ldfe f2, [r1, #0] +ldfe f3, [r1, #8] +adfdp f2, f2, f0 +adfdp f3, f3, f1 +ldfe f0, [r2, #0] +ldfe f1, [r2, #8] +adfd f0, f0, f2 +adfd f1, f1, f3 +stfe f0, [r2, #0] +stfe f1, [r2, #8] +#endif +mov r0, #1 +mov r1, r2 +mov r2, #0x11 +swi #0x900004 +mov r0, #0 +swi #0x900001 + +.data +data0: +.string "aaaabbbbccccdddd" +data1: +.string "bbbbccccddddeeee" +data2: +.string "hvLLWs\x1fsdrs9\x1fNJ-\n" |