Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Support for X32 ABI #13717

Open Quuxplusone opened 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR13666
Status NEW
Importance P enhancement
Reported by wbrana@gmail.com
Reported on 2012-08-22 09:44:59 -0700
Last modified on 2015-10-16 08:04:17 -0700
Version trunk
Hardware PC Linux
CC bertrand@jacquin.bzh, fantix.king@gmail.com, geek4civic@gmail.com, hartrumpf@gmx.net, kilobyte@angband.pl, llvm-bugs@lists.llvm.org, michael.hliao@gmail.com, pageexec@gmail.com, steven@uplinklabs.net
Fixed by commit(s)
Attachments sys-devel:clang-9999:20130427-002125.log.xz (140188 bytes, application/x-xz)
gcc_personality_v0-JKxFgr.sh (601 bytes, application/x-shellscript)
gcc_personality_v0-JKxFgr.c (54427 bytes, text/x-csrc)
build.log.xz (98568 bytes, application/x-xz)
atomic-dbf708.c (47931 bytes, text/x-csrc)
atomic-dbf708.sh (524 bytes, application/x-shellscript)
test.c (335 bytes, text/x-csrc)
test.ll (2492 bytes, application/octet-stream)
Blocks
Blocked by
See also https://bugs.gentoo.org/show_bug.cgi?id=480378
Linux since version 3.4 and GCC since version 4.7 support X32 ABI.
https://sites.google.com/site/x32abi/
LLVM could also support it.
Quuxplusone commented 12 years ago

An initial X32 patch at http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-June/050360.html and re-posted with split patches.

Quuxplusone commented 11 years ago

Attached sys-devel:clang-9999:20130427-002125.log.xz (140188 bytes, application/x-xz): build.log

Quuxplusone commented 10 years ago

Attached build.log.xz (98568 bytes, application/x-xz): build.log

Quuxplusone commented 11 years ago

Attached gcc_personality_v0-JKxFgr.c (54427 bytes, text/x-csrc): gcc_personality_v0-JKxFgr.c

Quuxplusone commented 10 years ago

Attached atomic-dbf708.c (47931 bytes, text/x-csrc): atomic-dbf708.c

Quuxplusone commented 11 years ago

Attached gcc_personality_v0-JKxFgr.sh (601 bytes, application/x-shellscript): gcc_personality_v0-JKxFgr.sh

Quuxplusone commented 10 years ago

Attached atomic-dbf708.sh (524 bytes, application/x-shellscript): atomic-dbf708.sh

Quuxplusone commented 9 years ago
Any chance of getting this fixed? Still seeing this on LLVM trunk, and it makes
me sad:

fatal error: error in backend: Cannot select: 0x45b1b80: ch = brind
0x45b1630:1, 0x45b1630 [ORD=1] [ID=10]
  0x45b1630: i32,ch = load 0x45b2ec0:1, 0x45c5b30, 0x45c5800<LD4[JumpTable]> [ORD=1] [ID=9]
    0x45c5b30: i32 = add 0x45b1da0, 0x45b2a80 [ORD=1] [ID=8]
      0x45b1da0: i32 = shl 0x45b2ec0, 0x45c5e60 [ORD=1] [ID=7]
        0x45b2ec0: i32,ch = CopyFromReg 0x450c9d0, 0x45b2ca0 [ORD=1] [ID=5]
          0x45b2ca0: i32 = Register %vreg204 [ID=1]
        0x45c5e60: i8 = Constant<2> [ID=4]
      0x45b2a80: i32 = X86ISD::Wrapper 0x45b2fd0 [ID=6]
        0x45b2fd0: i32 = TargetJumpTable<0> [ID=3]
    0x45c5800: i32 = undef [ID=2
Quuxplusone commented 9 years ago

could you post the test case? C source or LLVM IR?

Quuxplusone commented 9 years ago

Attached test.c (335 bytes, text/x-csrc): switch statement with jump table

Quuxplusone commented 9 years ago

Attached test.ll (2492 bytes, application/octet-stream): switch statement with jump table -- llvm IR

Quuxplusone commented 9 years ago
Repro command line:

 "/usr/bin/clang" "-cc1" "-triple" "x86_64-unknown-linux-gnux32" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "test.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-target-linker-version" "2.25.0" "-dwarf-column-info" "-ferror-limit" "19" "-fmessage-length" "133" "-mstackrealign" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c" "test.c"