[LLVMbugs] [Bug 6265] New: ARMCodeEmitter can't pass hello_world
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Feb 9 09:36:25 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6265
Summary: ARMCodeEmitter can't pass hello_world
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sliao at google.com
CC: llvmbugs at cs.uiuc.edu
Based on LLVM's version 3 days ago: 95512:
Abort happens at ARMCodeEmitter.cpp:554.
ARMCodeEmitter::emitPseudoInstruction(const MachineInstr &MI)
the Opcode (MI.getDesc().Opcode is 128 which is a invalid one.
I found that opcode (128) name is MOVi32imm, but in the emitPseudoInstruction,
this is treated as invalid opcode.
It seems the ARM code emitter in llvm is not completely implemented? below,
next to the faulting line is the comment "// FIXME: Add support for MOVimm32."
See below (excerpted from ARMCodeEmitter.cpp).
void ARMCodeEmitter::emitPseudoInstruction(const MachineInstr &MI) {
unsigned Opcode = MI.getDesc().Opcode;
switch (Opcode) {
default:
llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction");
// FIXME: Add support for MOVimm32.
case TargetInstrInfo::INLINEASM: {
// We allow inline assembler nodes with empty bodies - they can
// implicitly define registers, which is ok for JIT.
if (MI.getOperand(0).getSymbolName()[0]) {
llvm_report_error("JIT does not support inline asm!");
}
break;
}
case TargetInstrInfo::DBG_LABEL:
Because even hello_world doesn't work, I try to drill down further. Note that
the hello_world.c is written as follows:
extern int printf(const char*, ...);
int main(int argc, char** argv) {
int (*a)(const char*, ...) = printf;
a("Hello World!\n");
return a;
}
If I don't refer to function pointer or any global variable in hello_world.c,
then it can pass code emitter.
So we may have to implement this MOVi32imm, or use another instruction for
function pointer or global variables.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list