Please ignore my irritation while writing this, it's been a long day and I haven't been able to find an answer for the past few hours.
Let me be very verbose; I am trying to use C inline asm (seen below) to hook an OpenGL function, I am compiling on Windows, in 64-bit, and with the -masm=intel
flag. I've run into an issue where 90% of the asm I try to use throws an error from the assembler. I'm well aware this is because I'm not using Intel-Masm syntax, my main issue is I am unable to find documentation on this specific type of asm. Any help is appreciated.
void __declspec(naked) SwapTrampoline(){
// asm(
// "pushfq\n" // throws error
// "call openGlSwapBufferHook\n"
// "popfq\n"
// "jmp 0x6506CD2B"
// );
asm(
"JMP 7FF94E1C0B8h\n" // (Error: junk `FF94E1C0B8h' after expression)
"mov [rsp+10], rsi" // throws error
);
}