Browse Source

Print a bit before failing on invalid memory models

This way we'll be able to see what memory model is being passed, in case
someone has another problem with additional memory models in the future.
pull/111/head
Palmer Dabbelt 10 years ago
parent
commit
a347833d9c
  1. 5
      gcc/gcc/config/riscv/sync.md

5
gcc/gcc/config/riscv/sync.md

@ -52,7 +52,9 @@
(match_operand:SI 1 "const_int_operand" "")] ;; model
""
{
switch (INTVAL (operands[1]))
long model = INTVAL (operands[1]);
switch (model)
{
case MEMMODEL_SEQ_CST:
case MEMMODEL_SYNC_SEQ_CST:
@ -66,6 +68,7 @@
case MEMMODEL_SYNC_RELEASE:
return "fence rw,w";
default:
fprintf(stderr, "mem_thread_fence_1(%ld)\n", model);
gcc_unreachable();
}
})

Loading…
Cancel
Save