From: hadaq Date: Tue, 8 Sep 2009 22:23:02 +0000 (+0000) Subject: asm statement now as in kernel source X-Git-Tag: v6.0~346 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=57770d93f8ea1c46d2a1cfdb65100d7cf77ff4f8;p=trbnettools.git asm statement now as in kernel source --- diff --git a/libtrbnet/trbnet.c b/libtrbnet/trbnet.c index d00ce8d..7775e14 100644 --- a/libtrbnet/trbnet.c +++ b/libtrbnet/trbnet.c @@ -1,4 +1,4 @@ -const char trbnet_version[] = "$Revision: 2.43 $"; +const char trbnet_version[] = "$Revision: 2.44 $"; #include #include @@ -195,7 +195,6 @@ typedef enum { static uint32_t fifoToggleBit = 0; - static inline void write32_to_FPGA(uint16_t address, uint32_t value) { /* writes a 32bit word to a given address on a given device */ @@ -203,13 +202,9 @@ static inline void write32_to_FPGA(uint16_t address, uint32_t value) /* set address RW_WRITE */ fifoToggleBit ^= FIFO_TOGGLE_BIT; writePC((address & 0x7fff) | fifoToggleBit); - __asm("nop"); - __asm("nop"); - __asm("nop"); - - - - + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); /* write value */ fifoToggleBit ^= FIFO_TOGGLE_BIT; @@ -227,12 +222,9 @@ static inline void read32_from_FPGA(uint16_t address, uint32_t* value) /* set address RW_READ */ fifoToggleBit ^= FIFO_TOGGLE_BIT; writePC((address | 0x8000) | fifoToggleBit); - __asm("nop"); - __asm("nop"); - __asm("nop"); - - - + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); /* read value */ fifoToggleBit ^= FIFO_TOGGLE_BIT;