Skip to content

Commit

Permalink
[ARM] Implement ASM for test-suite tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Jan 12, 2014
1 parent 22dc90a commit 15bfae2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
4 changes: 4 additions & 0 deletions gcc/testsuite/gdc.test/runnable/test23.d
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ void test17()
{
"flds %1; fstps %0;" : "=m" (g) : "m" (f) : ;
}
else version(ARM) asm
{
"vldr d0, %1; vstr d0, %0;" : "=m" (g) : "m" (f), : "d0";
}
else static assert(false, "ASM code not implemented for this architecture");
}
else
Expand Down
6 changes: 5 additions & 1 deletion gcc/testsuite/gdc.test/runnable/test34.d
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,11 @@ void foo35()
{
"int $3;" : : : ;
}
else static assert(false, "ASM code not implemented for this architecture");
else
{
import gcc.builtins;
__builtin_trap();
}
}
else
asm { int 3; }
Expand Down
12 changes: 12 additions & 0 deletions gcc/testsuite/gdc.test/runnable/test36.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ extern (Windows):
{
"mov %%ESP,%0" : "=r" esp : : ;
}
else version(ARM) asm
{
"str sp,%0" : "=m" esp : : ;
}
else static assert(false, "ASM code not implemented for this architecture");
}
else asm
Expand Down Expand Up @@ -66,6 +70,10 @@ int main()
{
"mov %%ESP,%0" : "=r" esp : : ;
}
else version(ARM) asm
{
"str sp,%0" : "=m" esp : : ;
}
else static assert(false, "ASM code not implemented for this architecture");
}
else asm
Expand All @@ -85,6 +93,10 @@ int main()
{
"mov %%ESP,%0" : "=r" esp : : ;
}
else version(ARM) asm
{
"str sp,%0" : "=m" esp : : ;
}
else static assert(false, "ASM code not implemented for this architecture");
}
else asm
Expand Down
10 changes: 9 additions & 1 deletion gcc/testsuite/gdc.test/runnable/test42.d
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,11 @@ void crash(int x)
{
"int $3;" : : :;
}
else static assert(false, "ASM code not implemented for this architecture");
else
{
import gcc.builtins;
__builtin_trap();
}
}
else
{
Expand Down Expand Up @@ -4167,6 +4171,10 @@ int bug3809()
{
"nop;" : : :;
}
else version(ARM) asm
{
"nop;" : : :;
}
else static assert(false, "ASM code not implemented for this architecture");
}
else
Expand Down
4 changes: 3 additions & 1 deletion gcc/testsuite/gdc.test/runnable/testsafe.d
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,13 @@ void inlineasm()
static assert(!__traits(compiles, { asm { "nop;" :::; } }() ));
else version(X86_64)
static assert(!__traits(compiles, { asm { "nop;" :::; } }() ));
else version(ARM)
static assert(!__traits(compiles, { asm { "nop;" :::; } }() ));
else static assert(false, "ASM code not implemented for this architecture");
}
else
static assert(!__traits(compiles, { asm { int 3; } }() ));
}
}

@safe
void multablecast()
Expand Down

0 comments on commit 15bfae2

Please sign in to comment.