Changeset 5810a08 in rtems
- Timestamp:
- 07/27/22 13:20:32 (7 months ago)
- Branches:
- master
- Children:
- b868d0a
- Parents:
- e1fdf97
- git-author:
- Sebastian Huber <sebastian.huber@…> (07/27/22 13:20:32)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (07/27/22 15:01:14)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/arm/beagle/include/bsp.h
re1fdf97 r5810a08 117 117 static inline void dsb(void) 118 118 { 119 asmvolatile("dsb" : : : "memory");119 __asm__ volatile("dsb" : : : "memory"); 120 120 } 121 121 … … 123 123 static inline void isb(void) 124 124 { 125 asmvolatile("isb" : : : "memory");125 __asm__ volatile("isb" : : : "memory"); 126 126 } 127 127 … … 129 129 static inline void flush_data_cache(void) 130 130 { 131 asmvolatile(131 __asm__ volatile( 132 132 "mov r0, #0\n" 133 133 "mcr p15, #0, r0, c7, c10, #4\n" … … 230 230 uint32_t ctl; 231 231 232 asmvolatile("mrc p15, 0, %[ctl], c1, c0, 0 @ Read SCTLR\n\t"232 __asm__ volatile("mrc p15, 0, %[ctl], c1, c0, 0 @ Read SCTLR\n\t" 233 233 : [ctl] "=r" (ctl)); 234 234 return ctl; … … 238 238 static inline void write_sctlr(uint32_t ctl) 239 239 { 240 asmvolatile("mcr p15, 0, %[ctl], c1, c0, 0 @ Write SCTLR\n\t"240 __asm__ volatile("mcr p15, 0, %[ctl], c1, c0, 0 @ Write SCTLR\n\t" 241 241 : : [ctl] "r" (ctl)); 242 242 isb(); … … 248 248 uint32_t ctl; 249 249 250 asmvolatile("mrc p15, 0, %[ctl], c1, c0, 1 @ Read ACTLR\n\t"250 __asm__ volatile("mrc p15, 0, %[ctl], c1, c0, 1 @ Read ACTLR\n\t" 251 251 : [ctl] "=r" (ctl)); 252 252 return ctl; … … 256 256 static inline void write_actlr(uint32_t ctl) 257 257 { 258 asmvolatile("mcr p15, 0, %[ctl], c1, c0, 1 @ Write ACTLR\n\t"258 __asm__ volatile("mcr p15, 0, %[ctl], c1, c0, 1 @ Write ACTLR\n\t" 259 259 : : [ctl] "r" (ctl)); 260 260 isb(); … … 264 264 static inline void write_ttbcr(uint32_t bcr) 265 265 { 266 asmvolatile("mcr p15, 0, %[bcr], c2, c0, 2 @ Write TTBCR\n\t"266 __asm__ volatile("mcr p15, 0, %[bcr], c2, c0, 2 @ Write TTBCR\n\t" 267 267 : : [bcr] "r" (bcr)); 268 268 … … 275 275 uint32_t dacr; 276 276 277 asmvolatile("mrc p15, 0, %[dacr], c3, c0, 0 @ Read DACR\n\t"277 __asm__ volatile("mrc p15, 0, %[dacr], c3, c0, 0 @ Read DACR\n\t" 278 278 : [dacr] "=r" (dacr)); 279 279 … … 285 285 static inline void write_dacr(uint32_t dacr) 286 286 { 287 asmvolatile("mcr p15, 0, %[dacr], c3, c0, 0 @ Write DACR\n\t"287 __asm__ volatile("mcr p15, 0, %[dacr], c3, c0, 0 @ Write DACR\n\t" 288 288 : : [dacr] "r" (dacr)); 289 289 … … 296 296 297 297 /* Invalidate entire unified TLB */ 298 asmvolatile("mcr p15, 0, %[zero], c8, c7, 0 @ TLBIALL\n\t"298 __asm__ volatile("mcr p15, 0, %[zero], c8, c7, 0 @ TLBIALL\n\t" 299 299 : : [zero] "r" (0)); 300 300 301 301 /* Invalidate all instruction caches to PoU. 302 302 * Also flushes branch target cache. */ 303 asmvolatile("mcr p15, 0, %[zero], c7, c5, 0"303 __asm__ volatile("mcr p15, 0, %[zero], c7, c5, 0" 304 304 : : [zero] "r" (0)); 305 305 306 306 /* Invalidate entire branch predictor array */ 307 asmvolatile("mcr p15, 0, %[zero], c7, c5, 6"307 __asm__ volatile("mcr p15, 0, %[zero], c7, c5, 6" 308 308 : : [zero] "r" (0)); /* flush BTB */ 309 309 … … 317 317 uint32_t bar; 318 318 319 asmvolatile("mrc p15, 0, %[bar], c2, c0, 0 @ Read TTBR0\n\t"319 __asm__ volatile("mrc p15, 0, %[bar], c2, c0, 0 @ Read TTBR0\n\t" 320 320 : [bar] "=r" (bar)); 321 321 … … 329 329 uint32_t bar; 330 330 331 asmvolatile("mrc p15, 0, %[bar], c2, c0, 0 @ Read TTBR0\n\t"331 __asm__ volatile("mrc p15, 0, %[bar], c2, c0, 0 @ Read TTBR0\n\t" 332 332 : [bar] "=r" (bar)); 333 333 … … 345 345 flags here and remove them in the read_ttbr0 */ 346 346 uint32_t v = (bar & ARM_TTBR_ADDR_MASK ) | ARM_TTBR_FLAGS_CACHED; 347 asmvolatile("mcr p15, 0, %[bar], c2, c0, 0 @ Write TTBR0\n\t"347 __asm__ volatile("mcr p15, 0, %[bar], c2, c0, 0 @ Write TTBR0\n\t" 348 348 : : [bar] "r" (v)); 349 349 -
bsps/powerpc/include/bsp/tictac.h
re1fdf97 r5810a08 39 39 { 40 40 uint32_t tmp; 41 asmvolatile (41 __asm__ volatile ( 42 42 "mftb 0;" 43 43 "stw 0, ppc_tic_tac@sdarel(13);" … … 53 53 uint32_t ticks; 54 54 uint32_t tmp; 55 asmvolatile (55 __asm__ volatile ( 56 56 "mftb %0;" 57 57 "lwz %1, ppc_tic_tac@sdarel(13);" … … 68 68 { 69 69 uint32_t tmp; 70 asmvolatile (70 __asm__ volatile ( 71 71 "mftb 0;" 72 72 "stw 0, ppc_boom_bam@sdarel(13);" … … 82 82 uint32_t ticks; 83 83 uint32_t tmp; 84 asmvolatile (84 __asm__ volatile ( 85 85 "mftb %0;" 86 86 "lwz %1, ppc_boom_bam@sdarel(13);" -
bsps/powerpc/include/libcpu/spr.h
re1fdf97 r5810a08 52 52 { 53 53 unsigned long val; 54 asmvolatile("mfmsr %0" : "=r" (val));54 __asm__ volatile("mfmsr %0" : "=r" (val)); 55 55 return val; 56 56 } … … 58 58 static inline void _write_MSR(unsigned long val) 59 59 { 60 asmvolatile("mtmsr %0" : : "r" (val));60 __asm__ volatile("mtmsr %0" : : "r" (val)); 61 61 return; 62 62 } … … 65 65 { 66 66 unsigned long val; 67 asmvolatile (67 __asm__ volatile ( 68 68 ".machine \"push\"\n" 69 69 ".machine \"any\"\n" … … 78 78 static inline void _write_SR(unsigned long val, void * va) 79 79 { 80 asmvolatile (80 __asm__ volatile ( 81 81 ".machine \"push\"\n" 82 82 ".machine \"any\"\n" -
cpukit/score/cpu/or1k/include/rtems/score/or1k-utility.h
re1fdf97 r5810a08 346 346 uint32_t spr_value; 347 347 348 asmvolatile (348 __asm__ volatile ( 349 349 "l.mfspr %0, %1, 0;\n\t" 350 350 : "=r" (spr_value) : "r" (reg)); … … 355 355 static inline void _OR1K_mtspr(uint32_t reg, uint32_t value) 356 356 { 357 asmvolatile (357 __asm__ volatile ( 358 358 "l.mtspr %1, %0, 0;\n\t" 359 359 :: "r" (value), "r" (reg) … … 387 387 static inline void _OR1K_Sync_mem( void ) 388 388 { 389 asmvolatile("l.msync");389 __asm__ volatile("l.msync"); 390 390 } 391 391 392 392 static inline void _OR1K_Sync_pipeline( void ) 393 393 { 394 asmvolatile("l.psync");394 __asm__ volatile("l.psync"); 395 395 } 396 396 … … 403 403 */ 404 404 #define _OR1KSIM_CPU_Halt() \ 405 asmvolatile ("l.nop 0xc")405 __asm__ volatile ("l.nop 0xc") 406 406 407 407 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.