graph-easy <<< " [ info\n Explicitly define a variable of type char to be signed. ] -> [ x86 code\n char c = '*'; ] -> [ ARM code\n signed c = '*'; ] [ info\n Use the builtin function that comes with the compiler. ] -> [ x86 code\n __builtin_ia32_crc32qi(__a, __b); ] -> [ ARM code\n __builtin_aarch64_crc32b(__a, __b); ] [ info\n prefetch memory data into the cache. ] -> [ x86 code\n asm volatile(""prefetcht0 %0""::""m"" (*(unsigned long *)x)); ] -> [ ARM code\n define prefetch(_x) __builtin_prefetch(_x); ] [ info\n define the compiled program to be 64-bit. ] -> [ x86 code\n -m64; ] -> [ ARM code\n -mabi=lp64; ] [ info\n the instruction set type is defined in the Makefile, from x86 to ARM. ] -> [ x86 code\n -march=broadwell; ] -> [ ARM code\n -march=armv8-a; ] [ info\n replace the original x86 version of the compiled macros with the ARM version. ] -> [ x86 code\n __X86_64__; ] -> [ ARM code\n __ARM_64__; ] "
+-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | Explicitly define a variable of type char to be signed. | --> | char c = '*'; | --> | signed c = '*'; | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | Use the builtinfunction that comes with the compiler. | --> | __builtin_ia32_crc32qi(__a, __b); | --> | __builtin_aarch64_crc32b(__a, __b); | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | define the compiled program to be 64-bit. | --> | -m64; | --> | -mabi=lp64; | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | prefetch memory data into the cache. | --> | asm volatile(prefetcht0 %0::m (*(unsigned long *)x)); | --> | define prefetch(_x) __builtin_prefetch(_x); | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | replace the original x86 version of the compiled macros with the ARM version. | --> | __X86_64__; | --> | __ARM_64__; | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+ | info | | x86 code | | ARM code | | the instruction settype is defined in the Makefile, from x86 to ARM. | --> | -march=broadwell; | --> | -march=armv8-a; | +-------------------------------------------------------------------------------+ +-------------------------------------------------------+ +---------------------------------------------+
Maybe you could buy me a cup of coffee.
Scan this qrcode
Open alipay app scan this qrcode, buy me a coffee!
Scan this qrcode
Open wechat app scan this qrcode, buy me a coffee!