Changeset 1228 in vbox
- Timestamp:
- Mar 5, 2007 4:08:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r1030 r1228 1213 1213 1214 1214 /** 1215 * Disables interrupts and returns previous xFLAGS. 1216 */ 1217 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN 1218 DECLASM(RTCCUINTREG) ASMIntDisableFlags(void); 1219 #else 1220 DECLINLINE(RTCCUINTREG) ASMIntDisableFlags(void) 1221 { 1222 RTCCUINTREG xFlags; 1223 # if RT_INLINE_ASM_GNU_STYLE 1224 # ifdef __AMD64__ 1225 __asm__ __volatile__("pushfq\n\t" 1226 "cli\n\t" 1227 "popq %0\n\t" 1228 : "=m" (xFlags)); 1229 # else 1230 __asm__ __volatile__("pushfl\n\t" 1231 "cli\n\t" 1232 "popl %0\n\t" 1233 : "=m" (xFlags)); 1234 # endif 1235 # elif RT_INLINE_ASM_USES_INTRIN && !defined(__X86__) 1236 xFlags = ASMGetFlags(); 1237 _disable(); 1238 # else 1239 __asm { 1240 pushfd 1241 cli 1242 pop [xFlags] 1243 } 1244 # endif 1245 return xFlags; 1246 } 1247 #endif 1248 1249 1250 /** 1215 1251 * Reads a machine specific register. 1216 1252 *
Note:
See TracChangeset
for help on using the changeset viewer.