- Timestamp:
- 2005-11-11T14:06:55Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8a0b3730
- Parents:
- 0172eba
- Location:
- arch/ia64
- Files:
-
- 2 edited
-
include/atomic.h (modified) (2 diffs)
-
src/ivt.S (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/atomic.h
r0172eba r73a4bab 38 38 atomic_t v; 39 39 40 /*41 * __asm__ volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "=m" (val) : "i" (imm));42 */40 41 __asm__ volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (*val) : "i" (imm)); 42 43 43 *val += imm; 44 44 … … 46 46 } 47 47 48 static inline atomic_t atomic_inc(atomic_t *val) { return atomic_add(val, 1); } 49 static inline atomic_t atomic_dec(atomic_t *val) { return atomic_add(val, -1); } 48 static inline void atomic_inc(atomic_t *val) { atomic_add(val, 1); } 49 static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); } 50 51 52 static inline atomic_t atomic_inc_pre(atomic_t *val) { return atomic_add(val, 1); } 53 static inline atomic_t atomic_dec_pre(atomic_t *val) { return atomic_add(val, -1); } 54 55 56 static inline atomic_t atomic_inc_post(atomic_t *val) { return atomic_add(val, 1)+1; } 57 static inline atomic_t atomic_dec_post(atomic_t *val) { return atomic_add(val, -1)-1; } 58 59 60 50 61 51 62 #endif -
arch/ia64/src/ivt.S
r0172eba r73a4bab 1 1 # 2 2 # Copyright (C) 2005 Jakub Vana 3 # Copyright (C) 2005 Jakub Jermar4 3 # All rights reserved. 5 4 # … … 29 28 30 29 #include <arch/stack.h> 31 #include <arch/register.h>32 30 33 31 #define STACK_ITEMS 12 … … 107 105 108 106 /* assume kernel backing store */ 109 /* mov ar.bspstore = r28 ;; */107 mov ar.bspstore = r28 ;; 110 108 111 109 mov r29 = ar.bsp … … 147 145 ld8 r24 = [r31], +8 ;; /* load ar.rsc */ 148 146 149 /* mov ar.bspstore = r28 ;; *//* (step 4) */150 /* mov ar.rnat = r27 *//* (step 5) */147 mov ar.bspstore = r28 ;; /* (step 4) */ 148 mov ar.rnat = r27 /* (step 5) */ 151 149 152 150 mov ar.pfs = r25 /* (step 6) */ … … 192 190 193 191 /* 6. switch to bank 1 and reenable PSR.ic */ 194 ssm PSR_IC_MASK192 ssm 0x2000 195 193 bsw.1 ;; 196 194 srlz.d … … 248 246 249 247 /* 9. skipped (will not enable interrupts) */ 250 /*251 * ssm PSR_I_MASK252 * ;;253 * srlz.d254 */255 248 256 249 /* 10. call handler */ … … 262 255 263 256 /* 12. skipped (will not disable interrupts) */ 264 /*265 * rsm PSR_I_MASK266 * ;;267 * srlz.d268 */269 257 270 258 /* 13. restore general and floating-point registers */ … … 320 308 321 309 /* 15. disable PSR.ic and switch to bank 0 */ 322 rsm PSR_IC_MASK310 rsm 0x2000 323 311 bsw.0 ;; 324 312 srlz.d
Note:
See TracChangeset
for help on using the changeset viewer.
