Thursday, February 01, 2007

 

Beware of objdump and inline assembly

In the inline assemby, you can change the cpu mode with a directive such as .set mips4. Unfortunately, the objdump doesn't know this directive since it only looks at the object file. Sometimes it'll incorrectly decode a machine code.

I ran into this problem with the prefetch code. The assembly instruction pref was decoded to lw??. You have to provide a cpu mode options to objdump similar to how to specify the cpu mode to the compiler.


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?