1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Target/AVR
Ayke van Laethem 8f4cb72386 [AVR] Fix private label prefix
This is a small pet peeve from me. This change makes sure the AVR backend uses
the correct private label prefix (.L) so that private labels are hidden in
avr-objdump.

Example code:

    define i8 @foo(i1 %cond) {
      br i1 %cond, label %then, label %else
    then:
      ret i8 3
    else:
      ret i8 5
    }

When compiling this:
  llc -march=avr -filetype=obj -o test.o test.ll
and then dumping it:
  avr-objdump -d test.o
You would previously get an ugly temporary label:

    00000000 <foo>:
       0:        81 70       andi       r24, 0x01    ; 1
       2:        80 30       cpi        r24, 0x00    ; 0
       4:        f9 f3       breq       .-2          ; 0x4 <foo+0x4>
       6:        83 e0       ldi        r24, 0x03    ; 3
       8:        08 95       ret

    0000000a <LBB0_2>:
       a:        85 e0       ldi        r24, 0x05    ; 5
       c:        08 95       ret

This patch fixes that, the output is now:

    00000000 <foo>:
       0:        81 70       andi       r24, 0x01    ; 1
       2:        80 30       cpi        r24, 0x00    ; 0
       4:        01 f0       breq       .+0          ; 0x6 <foo+0x6>
       6:        83 e0       ldi        r24, 0x03    ; 3
       8:        08 95       ret
       a:        85 e0       ldi        r24, 0x05    ; 5
       c:        08 95       ret

Note that as you can see the breq operand is different. However it is
still the same after linking:

       4:        11 f0       breq       .+4

Differential Revision: https://reviews.llvm.org/D75124
2020-02-26 20:32:25 +01:00
..
AsmParser [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
Disassembler [AVR] Disassemble register operands 2020-02-24 19:35:51 +01:00
MCTargetDesc [AVR] Fix private label prefix 2020-02-26 20:32:25 +01:00
TargetInfo
AVR.h
AVR.td
AVRAsmPrinter.cpp [AsmPrinter][MCStreamer] De-capitalize EmitInstruction and EmitCFI* 2020-02-13 22:08:55 -08:00
AVRCallingConv.td
AVRDevices.td
AVRExpandPseudoInsts.cpp
AVRFrameLowering.cpp ArrayRef'ize spillCalleeSavedRegisters. NFCI. 2020-02-08 12:19:23 +01:00
AVRFrameLowering.h ArrayRef'ize spillCalleeSavedRegisters. NFCI. 2020-02-08 12:19:23 +01:00
AVRInstrFormats.td
AVRInstrInfo.cpp [NFC] unsigned->Register in storeRegTo/loadRegFromStack 2020-02-03 14:22:16 +01:00
AVRInstrInfo.h [NFC] unsigned->Register in storeRegTo/loadRegFromStack 2020-02-03 14:22:16 +01:00
AVRInstrInfo.td [AVR] Use correct register class for mul instructions 2020-02-24 19:19:56 +01:00
AVRISelDAGToDAG.cpp
AVRISelLowering.cpp
AVRISelLowering.h
AVRMachineFunctionInfo.h
AVRMCInstLower.cpp
AVRMCInstLower.h
AVRRegisterInfo.cpp
AVRRegisterInfo.h
AVRRegisterInfo.td
AVRRelaxMemOperations.cpp
AVRSelectionDAGInfo.h
AVRSubtarget.cpp
AVRSubtarget.h
AVRTargetMachine.cpp Fix AVR build after 777180a32b6107 2020-01-28 19:22:22 -05:00
AVRTargetMachine.h
AVRTargetObjectFile.cpp
AVRTargetObjectFile.h
CMakeLists.txt
LLVMBuild.txt
README.md
TODO.md

AVR backend

This experimental backend is for the 8-bit Atmel AVR microcontroller.