Add a test case for ".declare" pragma

This commit is contained in:
Homer Hsing 2012-09-18 16:28:27 +08:00 committed by Damien Lespiau
parent c3bcc7dbeb
commit 131f61f2ef
3 changed files with 11 additions and 1 deletions

View File

@ -21,6 +21,7 @@ TESTS = \
halt \
wait \
endif \
declare \
immediate
# Tests that are expected to fail because they contain some inccorect code.
@ -66,6 +67,8 @@ TESTDATA = \
wait.g4a \
endif.expected \
endif.g4a \
declare.expected \
declare.g4a \
immediate.g4a \
immediate.expected
@ -79,4 +82,4 @@ $(TESTS): run-test.sh
CLEANFILES = \
*.out \
${TESTS}
${TESTS}

View File

@ -0,0 +1,3 @@
{ 0x00e00040, 0x20007fbd, 0x008d0f64, 0x3f9d70a4 },
{ 0x00e00040, 0x200077bd, 0x008d0f64, 0x008d0020 },
{ 0x00e00040, 0x2f6477bd, 0x008d0000, 0x008d0020 },

View File

@ -0,0 +1,4 @@
.declare X1 Base=g123.4 ElementSize=4 SrcRegion=<8,8,1> DstRegion=<1> Type=F
add g0<1>:f X1 1.23:f;
add g0<1>:f X1 g1<8,8,1>:f;
add X1 g0<8,8,1>:f g1<8,8,1>:f;