Skip to content
  1. May 06, 2010
  2. May 05, 2010
  3. May 04, 2010
    • Daniel Dunbar's avatar
      MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of · c3e0bafc
      Daniel Dunbar authored
      instructions which have no direct register usage.
      
      Darwin 'as' accepts:
        add $0, (%rax)
      but rejects
        mov $0, (%rax)
      for example.
      
      Given that, only accept suffix matches which match exactly one form. We still
      need to emit nice diagnostics for failures...
      
      llvm-svn: 103015
      c3e0bafc
    • Daniel Dunbar's avatar
      MC/X86: Add "support" for matching ATT style mnemonic prefixes. · 9b816a1b
      Daniel Dunbar authored
       - The idea is that when a match fails, we just try to match each of +'b', +'w',
         +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept
         it. If all match, we assume it is width generic, and take the 'l' form.
      
       - This would be a horrible hack, if it weren't so simple. Therefore it is an
         elegant solution! Chris gets the credit for this particular elegant
         solution. :)
      
       - Next step to making this more robust is to have the X86 matcher generate the
         mnemonic prefix information. Ideally we would also compute up-front exactly
         which mnemonic to attempt to match, but this may require more custom code in
         the matcher than is really worth it.
      
      llvm-svn: 103012
      9b816a1b
  4. May 03, 2010
  5. Apr 29, 2010
  6. Apr 21, 2010
  7. Apr 20, 2010
  8. Apr 19, 2010
  9. Apr 17, 2010
  10. Apr 16, 2010
  11. Apr 15, 2010
  12. Apr 14, 2010
  13. Apr 12, 2010
    • Johnny Chen's avatar
      Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after calling · fc93503c
      Johnny Chen authored
      ARM_AM::getSoImmVal(V) with a legitimate so_imm value: #245 rotate right by 2.
      Introduce ARM_AM::getSOImmValOneOrNoRotate(unsigned Arg) which is called from
      ARMInstPrinter.cpp's printSOImm() function, replacing ARM_AM::getSOImmVal(V).
      
      [12:44:43] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ gdb Debug/bin/llvm-mc
      GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
      Copyright 2004 Free Software Foundation, Inc.
      GDB is free software, covered by the GNU General Public License, and you are
      welcome to change it and/or distribute copies of it under certain conditions.
      Type "show copying" to see the conditions.
      There is absolutely no warranty for GDB.  Type "show warranty" for details.
      This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done
      
      (gdb) set args  -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
      (gdb) r
      Starting program: /Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
      Reading symbols for shared libraries ++. done
      0xf5 0x71 0xf0 0x53
      Opcode=201 Name=MVNi Format=ARM_FORMAT_DPFRM(4)
       31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
      -------------------------------------------------------------------------------------------------
      | 0: 1: 0: 1| 0: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 1: 1| 0: 0: 0: 1| 1: 1: 1: 1| 0: 1: 0: 1|
      -------------------------------------------------------------------------------------------------
      
      	mvnpls	r7, Assertion failed: (V != -1 && "Not a valid so_imm value!"), function printSOImm, file ARMInstPrinter.cpp, line 229.
      
      Program received signal SIGABRT, Aborted.
      0x00007fff88c65886 in __kill ()
      (gdb) bt
      #0  0x00007fff88c65886 in __kill ()
      #1  0x00007fff88d05eae in abort ()
      #2  0x00007fff88cf2ef0 in __assert_rtn ()
      #3  0x000000010020e422 in printSOImm (O=@0x1010bdf80, V=-1, VerboseAsm=false, MAI=0x1020106d0) at ARMInstPrinter.cpp:229
      #4  0x000000010020e5fe in llvm::ARMInstPrinter::printSOImmOperand (this=0x1020107e0, MI=0x7fff5fbfee70, OpNum=1, O=@0x1010bdf80) at ARMInstPrinter.cpp:254
      #5  0x00000001001ffbc0 in llvm::ARMInstPrinter::printInstruction (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMGenAsmWriter.inc:3236
      #6  0x000000010020c27c in llvm::ARMInstPrinter::printInst (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMInstPrinter.cpp:182
      #7  0x000000010003cbff in PrintInsts (DisAsm=@0x10200f4e0, Printer=@0x1020107e0, Bytes=@0x7fff5fbff060, SM=@0x7fff5fbff078) at Disassembler.cpp:65
      #8  0x000000010003c8b4 in llvm::Disassembler::disassemble (T=@0x1010c13c0, Triple=@0x1010b6798, Buffer=@0x102010690) at Disassembler.cpp:153
      #9  0x000000010004095c in DisassembleInput (ProgName=0x7fff5fbff3f0 "/Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc") at llvm-mc.cpp:347
      #10 0x000000010003eefb in main (argc=4, argv=0x7fff5fbff298) at llvm-mc.cpp:374
      (gdb) q
      The program is running.  Exit anyway? (y or n) y
      [13:36:26] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ 
      
      llvm-svn: 101053
      fc93503c
  14. Apr 07, 2010
  15. Apr 05, 2010
  16. Apr 03, 2010
  17. Mar 30, 2010
  18. Mar 25, 2010
  19. Mar 24, 2010
  20. Mar 20, 2010
  21. Mar 19, 2010
    • Kevin Enderby's avatar
      Fixed the encoding problems of the crc32 instructions. All had the Operand size · cf0843ed
      Kevin Enderby authored
      override prefix and only the r/m16 forms should have had that.  Also for variant
      one, the AT&T syntax, added suffixes to all forms.  Also added the missing
      64-bit form for 'CRC32 r64, r/m8'.  Plus added test cases for all forms and
      tweaked one test case to add the needed suffixes.
      
      llvm-svn: 98980
      cf0843ed
    • Daniel Dunbar's avatar
      MC/Mach-O/x86_64: Add relocation support. · 1a81ad35
      Daniel Dunbar authored
       - This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information.
       - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily).
       - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :)
      
      llvm-svn: 98974
      1a81ad35
Loading