[LLVMdev] splice and undefined physical reg

Johnny Bory johnny.bory.12 at gmail.com
Tue Jul 28 01:46:23 PDT 2015


Hi,

i have got some troubles while trying to instrumentate a indirect call
instruction.
Basically, every time i run into a CALL64r i would like to have this
situation:
                 ------
                | .... |
                | CMP  |
                | JE   |
                 ------
                  |  |
                ---  -----
                |        |
                ----    ----
               |EXIT|  |CALL|
                ----   |....|
                        ----
So i do a splice, fix up successors and predecessors, but since the call
implicitly uses some register the compilation fails with a lot of this:

  *** Bad machine code: Using an undefined physical register ***
- function:    parse_and_dump_tv_tag
- basic block: BB#126 (null) (0x6127658)
- instruction: CALL64r %vreg41, <regmask>, %RSP<imp-use>, %EDI<imp-use>,
%RSI<imp-use>, %RDX<imp-use>, %RCX<imp-use>, %R8<imp-use>, %R9D<imp-use>,
%AL<imp-use>, %RSP<imp-def>, %EAX<imp-def>; GR64:%vreg41

How can i get rid of this errors?

Thank you very much,

-- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150728/a1293bf3/attachment.html>


More information about the llvm-dev mailing list