
#10375: arm: ghci hits an illegal instruction -------------------------------------+--------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Comment (by erikd): Compiling as above with `-keep-s-file -keep-llvm-file`: {{{ stg_ap_v_fast$def: @ @"stg_ap_v_fast$def" .fnstart .Leh_func_begin69: @ BB#0: @ %cmL movw r0, :lower16:MainCapability movt r0, :upper16:MainCapability ldr r1, [r0, #16] and r2, r1, #3 cmp r2, #1 bne .LBB69_2 @ BB#1: @ %cmn ldr r0, [r1, #-1] ldr r0, [r0] }}} and the LLVM code: {{{ @stg_ap_v_fast = alias i8* bitcast (void ()* @stg_ap_v_fast$def to i8*) define ccc void @stg_ap_v_fast$def() align 4 nounwind { cmL: %lcmm = alloca i32, i32 1 %lcmA = alloca i32, i32 1 %lcmC = alloca i32, i32 1 %ln3zE = ptrtoint i8* @MainCapability to i32 %ln3zF = add i32 %ln3zE, 16 %ln3zG = inttoptr i32 %ln3zF to i32* %ln3zH = load i32* %ln3zG, !tbaa !5 %ln3zI = and i32 %ln3zH, 3 %ln3zJ = icmp eq i32 %ln3zI, 1 br i1 %ln3zJ, label %cmn, label %cmp cmp: %ln3zK = ptrtoint i8* @MainCapability to i32 %ln3zL = add i32 %ln3zK, 808 %ln3zM = inttoptr i32 %ln3zL to i32* %ln3zN = load i32* %ln3zM, !tbaa !5 %ln3zO = add i32 %ln3zN, -4 }}} which suggests this is an LLVM Arm code gen bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10375#comment:43 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler