DSB instruction and ARMv6 - Raspberry Pi Forums


i'm working on port of mit/intel cilk runtime arm

viewtopic.php?f=33&t=102743

, trying put binary package runs on both original raspberry pi , new pi 2b. difficulty pi 2b needs dsb data synchronization barrier instruction manage multi-core hardware whereas original pi doesn't have instruction. make definition

#define __cilkrts_fence() __asm__ volatile ("dsb")

in runtime source , works fine on pi 2b. binary equivalent to

#define __cilkrts_fence() __asm__ volatile (".word 0xf57ff04f")

again works fine on pi 2b , has advantage can compiled assembler in armv6 mode. not surprisingly resulting binary gives "illegal instruction" trap when run on original pi. therefore, need insert code tests cpuid register , makes relative branch skip past dsb instruction if cpuid armv6. logically code should function as

if cpuid != armv6 dsb

, written in inline assembler. while expect simple enough, i'm complete noob @ arm assembler , appreciate offered.



raspberrypi



Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support