1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/CodeGen/MSP430/2009-12-21-FrameAddr.ll
Anton Korobeynikov 0f36c4e23f [MSP430] Emit a separate section for every interrupt vector
This is LLVM part of D56663

Linker scripts shipped by TI require to have every
interrupt vector in a separate section with a specific name:

 SECTIONS
 {
   __interrupt_vector_XX   : { KEEP (*(__interrupt_vector_XX )) } > VECTXX
   ...
 }

Follow the requirement emit the section for every vector
which contain address of interrupt handler:

  .section  __interrupt_vector_XX,"ax",@progbits
  .word %isr%

Patch by Kristina Bessonova!

Differential Revision: https://reviews.llvm.org/D56664

llvm-svn: 351345
2019-01-16 14:03:41 +00:00

16 lines
354 B
LLVM

; RUN: llc < %s
; PR5703
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
target triple = "msp430-unknown-linux-gnu"
define msp430_intrcc void @foo() nounwind #0 {
entry:
%fa = call i8* @llvm.frameaddress(i32 0)
store i8 0, i8* %fa
ret void
}
declare i8* @llvm.frameaddress(i32)
attributes #0 = { noinline nounwind optnone "interrupt"="2" }