CTSRD-CHERI / clang

DO NOT USE. Use llvm-project instead
Other
9 stars 8 forks source link

Backend error with "c" as constraint for operand of inline-assembly #96

Closed hbcam closed 6 years ago

hbcam commented 8 years ago

Command:

cheri-unknown-freebsd-clang -target cheri-unknown-freebsd -mcpu=mips4 -mabi=sandbox -O2 t.c O2 seems important here

Result:

fatal error: error in backend: Cannot select: 0x80528eab0: iFATPTR = bitcast 0x80528e980
  0x80528e980: i64,ch,glue = CopyFromReg 0x80528e850, Register:i64 %T9_64, 0x80528e850:1
    0x80528e4c0: i64 = Register %T9_64
    0x80528e850: ch,glue = inlineasm 0x805058230, TargetExternalSymbol:i64'cmove $0, $$c3 
', MDNode:ch<0x80513b468>, TargetConstant:i64<1>, TargetConstant:i32<10>, Register:i64 %T9_64, TargetConstant:i32<12>, Register:i32 %AT
      0x80528e000: i64 = TargetExternalSymbol'cmove $0, $$c3 
'
      0x80528e260: i64 = TargetConstant<1>
      0x80528e390: i32 = TargetConstant<10>
      0x80528e4c0: i64 = Register %T9_64
      0x80528e5f0: i32 = TargetConstant<12>
      0x80528e720: i32 = Register %AT
In function: magic
clang-3.8: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.8.0 (https://github.com/CTSRD-CHERI/clang 473591c52d2160071616e8574dc80305abfdda52) (http://github.com/CTSRD-CHERI/llvm 388f6926b8f9bb0557c65b74badb8a34734f13dc)
Target: cheri-unknown-freebsd
Thread model: posix
InstalledDir: .../sdk/sdk/bin
clang-3.8: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-3.8: note: diagnostic msg: 
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.8: note: diagnostic msg: /tmp/t-9e816e.c
clang-3.8: note: diagnostic msg: /tmp/t-9e816e.sh
clang-3.8: note: diagnostic msg: 

********************

t-9e816e.c.txt t-9e816e.sh.txt

brooksdavis commented 6 years ago

After hacking there command line to work, this still produces a backend error, but doesn't crash for me. Please reopen with an uptodate test if this is still an issue.