Skip to content

[X87 FPStack] Issues with inline asm #2642

@edwintorok

Description

@edwintorok
Bugzilla Link 2270
Resolution FIXED
Resolved on Jun 28, 2011 18:13
Version unspecified
OS Linux
Blocks #1234
Attachments full testcase
CC @asl,@efriedma-quic,@pwo,@stoklund

Extended Description

While building glibc this error occurs 3 times:

cc1: /home/edwin/llvm/llvm-svn/trunk/lib/Target/X86/X86FloatingPoint.cpp:858: void::FPS::handleTwoArgFP(llvm::ilist_iteratorllvm::MachineInstr&): Assertion `UpdatedSlot < StackTop && Dest < 7' failed.
../sysdeps/ieee754/ldbl-96/e_asinl.c:161: internal compiler error: Aborted

To reproduce:

$ llc x.bc -f
llc: /home/edwin/llvm/llvm-svn/trunk/lib/Target/X86/X86FloatingPoint.cpp:858: void::FPS::handleTwoArgFP(llvm::ilist_iteratorllvm::MachineInstr&): Assertion `UpdatedSlot < StackTop && Dest < 7' failed.
llc[0x852b506]
/lib/i686/cmov/libc.so.6(abort+0x101)[0x4ecdc871]
/lib/i686/cmov/libc.so.6(__assert_fail+0xee)[0x4ecd40ee]
llc[0x81012cc]
Aborted

$ llc bugpoint-reduced-simplified.bc -f
llc: /home/edwin/llvm/llvm-svn/trunk/lib/Target/X86/X86FloatingPoint.cpp:92: unsigned int::FPS::getStackEntry(unsigned int) const: Assertion `STi < StackTop && "Access past stack top!"' failed.
llc[0x852b506]
/lib/i686/cmov/libc.so.6(abort+0x101)[0x4ecdc871]
/lib/i686/cmov/libc.so.6(__assert_fail+0xee)[0x4ecd40ee]
llc[0x80ff2f4]
Aborted

; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"

define x86_fp80 @​__ieee754_asinl(x86_fp80 %x) nounwind {
entry:
%asmtmp = call x86_fp80 asm sideeffect "fsqrt", "={st},0,{dirflag},{fpsr},~{flags}"( x86_fp80 0xK00000000000000000000 ) nounwind ; <x86_fp80> [#uses=0]
%tmp243 = sub x86_fp80 0xK80000000000000000000, 0xK00000000000000000000 ; <x86_fp80> [#uses=1]
ret x86_fp80 %tmp243
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions