Index: src/cmd/5l/asm.c |
=================================================================== |
--- a/src/cmd/5l/asm.c |
+++ b/src/cmd/5l/asm.c |
@@ -2192,7 +2192,9 @@ |
int |
chipzero(Ieee *e) |
{ |
- if(e->l != 0 || e->h != 0) |
+ // if this procedure returns 0, then 5l will use the "vmov (imm)" |
+ // instruction which only exists on VFPv3. We use GOARM=7 to gate it. |
+ if(goarm < 7 || e->l != 0 || e->h != 0) |
return -1; |
return 0; |
} |
@@ -2203,6 +2205,11 @@ |
int n; |
ulong h; |
+ // if this procedure returns non-negative number 5l will use the "vmov (imm)" |
+ // instruction which only exists on VFPv3. We use GOARM=7 to gate it. |
+ if(goarm < 7) |
+ goto no; |
+ |
if(e->l != 0 || (e->h&0xffff) != 0) |
goto no; |
h = e->h & 0x7fc00000; |