x86-64 Relative jmp performance
问题 I'm currently doing an assignment that measures the performance of various x86-64 commands (at&t syntax). The command I'm somewhat confused on is the "unconditional jmp" command. This is how I've implemented it: .global uncond uncond: .rept 10000 jmp . + 2 .endr mov $10000, %rax ret It's fairly simple. The code creates a function called "uncond" which uses the .rept directive to call the jmp command 10000 times, then sets the return value to the number of times you called the jmp command. "."