Skip to content

Commit

Permalink
add error for unsupported SIMD
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 17, 2012
1 parent 8281915 commit c4c5e70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/backend/cgxmm.c
Expand Up @@ -14,6 +14,8 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>

#include "cc.h"
#include "oper.h"
#include "el.h"
Expand Down Expand Up @@ -743,6 +745,11 @@ code *cdvector(elem *e, regm_t *pretregs)
* op op1
*/

if (!config.fpxmmregs)
{ printf("SIMD operations not supported on this platform\n");
exit(1);
}

elem *e1 = e->E1;
assert(e1->Eoper == OPparam);
elem *op2 = e1->E2;
Expand Down
4 changes: 4 additions & 0 deletions src/backend/cod3.c
Expand Up @@ -447,6 +447,10 @@ regm_t regmask(tym_t tym, tym_t tyf)
case TYulong4:
case TYllong2:
case TYullong2:
if (!config.fpxmmregs)
{ printf("SIMD operations not supported on this platform\n");
exit(1);
}
return mXMM0;

default:
Expand Down

0 comments on commit c4c5e70

Please sign in to comment.