Quantcast
Channel: PC-relative jump in gcc inline assembly - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by FrankH. for PC-relative jump in gcc inline assembly

In gcc inline assembly, you can use labels and have the assembler sort out the jump target for you. Something like (contrived example):int max(int a, int b){ int result; __asm__ __volatile__("movl %1,...

View Article



Answer by nelhage for PC-relative jump in gcc inline assembly

This isn't a direct answer, but have you considered using a variant ofDuff's Device instead of inlineassembly? That would take the form of switch statement:switch(iterations) { case 128: /* code for...

View Article

Answer by LocoDelAssembly for PC-relative jump in gcc inline assembly

Sorry I can't provide the answer in ATT syntax, I hope you can easily perform the translations.If you have the count in RCX and you can have a label just after __mul(0) then you could do this:; rcx...

View Article

PC-relative jump in gcc inline assembly

I have an asm loop guaranteed not to go over 128 iterations that I want to unroll with a PC-relative jump. The idea is to unroll each iteration in reverse order and then jump however far into the loop...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images