diff options
| author | Anton Korobeynikov <anton@korobeynikov.info> | 2019-01-25 09:14:05 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <anton@korobeynikov.info> | 2019-01-25 09:14:05 +0000 |
| commit | 509d5c4a7dcc22320fe9b277cd53585cc7d02a36 (patch) | |
| tree | 4e099569f1734242b8c13eca36a1643b586fb412 /llvm/test/CodeGen/MSP430 | |
| parent | 58f6bc509b365aa8516acc03c85b5d0712cf4af6 (diff) | |
| download | bcm5719-llvm-509d5c4a7dcc22320fe9b277cd53585cc7d02a36.tar.gz bcm5719-llvm-509d5c4a7dcc22320fe9b277cd53585cc7d02a36.zip | |
[MSP430] Fix absolute addressing mode printing in AsmPrinter
Align checks for absolute addressing mode with its current
implementation (SR is used as a base register).
This fixes https://bugs.llvm.org/show_bug.cgi?id=39993
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D56785
llvm-svn: 352178
Diffstat (limited to 'llvm/test/CodeGen/MSP430')
| -rw-r--r-- | llvm/test/CodeGen/MSP430/inline-asm-absolute-addressing.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MSP430/inline-asm-absolute-addressing.ll b/llvm/test/CodeGen/MSP430/inline-asm-absolute-addressing.ll new file mode 100644 index 00000000000..91505dca48d --- /dev/null +++ b/llvm/test/CodeGen/MSP430/inline-asm-absolute-addressing.ll @@ -0,0 +1,15 @@ +; RUN: llc < %s | FileCheck %s + +; Check that absolute addressing mode is represented in a way +; defined in MSP430 EABI and not as indexed addressing mode form. +; See PR39993 for details. + +target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-n8:16" +target triple = "msp430-elf" + +define void @f() { +entry: +; CHECK: mov r1, &256 + call void asm sideeffect "mov r1, $0", "*m"(i8* inttoptr (i16 256 to i8*)) + ret void +} |

