[LLVMbugs] [Bug 23033] New: [ASM] cannot set unwind info for eflags register

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 26 03:36:15 PDT 2015


            Bug ID: 23033
           Summary: [ASM] cannot set unwind info for eflags register
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexandre.martins at stormshield.eu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14102
  --> https://llvm.org/bugs/attachment.cgi?id=14102&action=edit
sample code

I currently trying to make a bare c++ new kernel.
In one of piece of assembly code, I play with eflags register, and i want to
provide unwinding info.
However, clang rejects the use of eflags as register, but it works with gcc

$ clang36 -m32 -c check.s 
check.s:11:23: error: invalid register name
    .cfi_offset eflags, 0
check.s:16:24: error: invalid register name
    .cfi_restore eflags
$ gcc49 -m32 -c check.s
$ echo $?
$ readelf -wf check.o 
Contenu de la section .eh_frameĀ :

00000000 00000014 00000000 CIE
  Version:               1
  Augmentation:          "zR"
  Code alignment factor: 1
  Data alignment factor: -4
  Return address column: 8
  Augmentation data:     1b

  DW_CFA_def_cfa: r4 (esp) ofs 4
  DW_CFA_offset: r8 (eip) at cfa-4

00000018 0000001c 0000001c FDE cie=00000000 pc=00000000..00000007
  DW_CFA_advance_loc: 1 to 00000001
  DW_CFA_def_cfa_offset: 8
  DW_CFA_advance_loc: 2 to 00000003
  DW_CFA_def_cfa_register: r5 (ebp)
  DW_CFA_advance_loc: 1 to 00000004
  DW_CFA_offset: r9 (eflags) at cfa+0
  DW_CFA_advance_loc: 1 to 00000005
  DW_CFA_restore: mauvais registreĀ : r9 (eflags)
  DW_CFA_advance_loc: 1 to 00000006
  DW_CFA_def_cfa: r4 (esp) ofs 4

Can be possible to add support of this register ?

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150326/255eadbe/attachment.html>

More information about the llvm-bugs mailing list