/*++ BUILD Version: 0004 // Increment this if a change has global effects */ //++ // // Module Name: // // kxia64.h // // Abstract: // // This module contains the nongenerated part of the IA64 assembler // header file. In general, it contains processor architecture constant // information, however some assembler macros are also included. // // Author: // // bjl 12-Jun-95 (based on David N. Cutler (davec) 23-Mar-1990) // // Revision History: // //-- #define SHADOW_IRQL_IMPLEMENTATION 1 // // N. B. Register aliases have been moved to ksia64.h (because we // use assembler aliases not #define's) // // Register constants // For setting non-rotating predicates (not used very much) #define PS0 0x0001 #define PS1 0x0002 #define PS2 0x0004 #define PS3 0x0008 #define PS4 0x0010 #define PS5 0x0020 #define PRP 0x0080 #define PT0 0x0040 #define PT1 0x0100 #define PT2 0x0200 #define PT3 0x0400 #define PT4 0x0800 #define PT5 0x1000 #define PT6 0x2000 #define PT7 0x4000 #define PT8 0x8000 // For setting nomination register #define NOM_BS0 0x0001 #define NOM_BS1 0x0002 #define NOM_BS2 0x0004 #define NOM_BS3 0x0008 #define NOM_BS4 0x0010 #define NOM_BS5 0x0020 #define NOM_BRP 0x0080 #define NOM_BT0 0x0040 #define NOM_BT1 0x0100 #define NOM_BT2 0x0200 #define NOM_BT3 0x0400 #define NOM_BT4 0x0800 #define NOM_BT5 0x1000 #define NOM_BT6 0x2000 #define NOM_BT7 0x4000 #define NOM_BT8 0x8000 // // // Define IA64 system registers. // // Define IA64 system register bit field offsets. // // Processor Status Register (PSR) Bit positions // User / System mask #define PSR_MBZ4 0 #define PSR_BE 1 #define PSR_UP 2 #define PSR_AC 3 #define PSR_MFL 4 #define PSR_MFH 5 // PSR bits 6-12 reserved (must be zero) #define PSR_MBZ0 6 #define PSR_MBZ0_V 0x7fi64 // System only mask #define PSR_IC 13 #define PSR_I 14 #define PSR_PK 15 #define PSR_MBZ1 16 #define PSR_MBZ1_V 0x1i64 #define PSR_DT 17 #define PSR_DFL 18 #define PSR_DFH 19 #define PSR_SP 20 #define PSR_PP 21 #define PSR_DI 22 #define PSR_SI 23 #define PSR_DB 24 #define PSR_LP 25 #define PSR_TB 26 #define PSR_RT 27 // PSR bits 28-31 reserved (must be zero) #define PSR_MBZ2 28 #define PSR_MBZ2_V 0xfi64 // Neither mask #define PSR_CPL 32 #define PSR_CPL_LEN 2 #define PSR_IS 34 #define PSR_MC 35 #define PSR_IT 36 #define PSR_ID 37 #define PSR_DA 38 #define PSR_DD 39 #define PSR_SS 40 #define PSR_RI 41 #define PSR_RI_LEN 2 #define PSR_ED 43 #define PSR_BN 44 #define PSR_IA 45 // PSR bits 46-63 reserved (must be zero) #define PSR_MBZ3 46 #define PSR_MBZ3_V 0x3ffffi64 // // Privilege levels // #define PL_KERNEL 0 #define PL_USER 3 // // Instruction set (IS) bits // #define IS_EM 0 #define IS_IA 1 // Floating Point Status Register (FPSR) Bit positions // Status Field 0 - Flags #define FPSR_VD 0 #define FPSR_DD 1 #define FPSR_ZD 2 #define FPSR_OD 3 #define FPSR_UD 4 #define FPSR_ID 5 // Status Field 0 - Controls #define FPSR_FTZ0 6 #define FPSR_WRE0 7 #define FPSR_PC0 8 #define FPSR_RC0 10 #define FPSR_TD0 12 // Status Field 0 - Flags #define FPSR_V0 13 #define FPSR_D0 14 #define FPSR_Z0 15 #define FPSR_O0 16 #define FPSR_U0 17 #define FPSR_I0 18 // Status Field 1 - Controls #define FPSR_FTZ1 19 #define FPSR_WRE1 20 #define FPSR_PC1 21 #define FPSR_RC1 23 #define FPSR_TD1 25 // Status Field 1 - Flags #define FPSR_V1 26 #define FPSR_D1 27 #define FPSR_Z1 28 #define FPSR_O1 29 #define FPSR_U1 30 #define FPSR_I1 31 // Status Field 2 - Controls #define FPSR_FTZ2 32 #define FPSR_WRE2 33 #define FPSR_PC2 34 #define FPSR_RC2 36 #define FPSR_TD2 38 // Status Field 2 - Flags #define FPSR_V2 39 #define FPSR_D2 40 #define FPSR_Z2 41 #define FPSR_O2 42 #define FPSR_U2 43 #define FPSR_I2 44 // Status Field 3 - Controls #define FPSR_FTZ3 45 #define FPSR_WRE3 46 #define FPSR_PC3 47 #define FPSR_RC3 49 #define FPSR_TD3 51 // Status Field 3 - Flags #define FPSR_V3 52 #define FPSR_D3 53 #define FPSR_Z3 54 #define FPSR_O3 55 #define FPSR_U3 56 #define FPSR_I3 57 // FPSR bits 58-63 Reserved -- Must be zero #define FPSR_MBZ0 58 #define FPSR_MBZ0_V 0x3fi64 // // For setting up FPSR on kernel entry // // all FP exceptions masked // // rounding to nearest, 64-bit precision, wide range enabled for FPSR.fs1 // // rounding to nearest, 53-bit precision, wide range disabled for FPSR.fs0 // #define FPSR_FOR_KERNEL 0x9804C0270033F // // Define hardware Task Priority Register (TPR) // // TPR bit positions // Bits 0 - 3 ignored #define TPR_MIC 4 #define TPR_MIC_LEN 4 // Bits 8 - 15 reserved // TPR.mmi is always 0 in NT #define TPR_MMI 16 // Bits 17 - 63 ignored // // The current IRQL is maintained in the TPR.mic field. The // shift count is the number of bits to shift right to extract the // IRQL from the TPR. See the GET/SET_IRQL macros. // #define TPR_IRQL_SHIFT TPR_MIC // // To go from vector number <-> IRQL we just do a shift // #define VECTOR_IRQL_SHIFT TPR_IRQL_SHIFT // // Define hardware Interrupt Status Register (ISR) // // ISR bit positions #define ISR_CODE 0 #define ISR_CODE_LEN 16 #define ISR_CODE_MASK 0xFFFF #define ISR_NA_CODE_MASK 0xF #define ISR_IA_VECTOR 16 #define ISR_IA_VECTOR_LEN 8 // ISR bits 24-31 reserved #define ISR_MBZ0 24 #define ISR_MBZ0_V 0xff #define ISR_X 32 #define ISR_W 33 #define ISR_R 34 #define ISR_NA 35 #define ISR_SP 36 #define ISR_RS 37 #define ISR_IR 38 #define ISR_NI 39 // ISR bit 40 reserved #define ISR_MBZ1 40 #define ISR_EI 41 #define ISR_ED 43 // ISR bits 44-63 reserved #define ISR_MBZ2 44 #define ISR_MBZ2_V 0xfffff // // ISR codes for Non-Access Instructions: ISR{3:0} // #define ISR_TPA 0 // tpa instruction #define ISR_FC 1 // fc instruction #define ISR_PROBE 2 // probe instruction #define ISR_TAK 3 // tak instruction #define ISR_LFETCH 4 // lfetch, lfetch.fault instruction #define ISR_PROBE_FAULT 5 // probe.fault instruction // // ISR codes for General Exceptions: ISR{7:4} // #define ISR_ILLEGAL_OP 0 // Illegal operation fault #define ISR_PRIV_OP 1 // Privileged operation fault #define ISR_PRIV_REG 2 // Privileged register fault #define ISR_RESVD_REG 3 // Reserved register/field fault #define ISR_ILLEGAL_ISA 4 // Disabled instruction set transition fault #define ISR_ILLEGAL_HAZARD 8 // Illegal hazard fault // // ISR codes for Nat Consumption Faults: ISR{7:4} // #define ISR_NAT_REG 1 // Nat Register Consumption fault #define ISR_NAT_PAGE 2 // Nat Page Consumption fault // // For Traps ISR{3:0} // // FP trap #define ISR_FP_TRAP 0 // Lower privilege transfer trap #define ISR_LP_TRAP 1 // Taken branch trap #define ISR_TB_TRAP 2 // Single step trap #define ISR_SS_TRAP 3 // Unimplemented instruction address trap #define ISR_UI_TRAP 4 // // Define hardware Default Control Register (DCR) // // DCR bit positions #define DCR_PP 0 #define DCR_BE 1 #define DCR_LC 2 // DCR bits 3-7 reserved #define DCR_DM 8 #define DCR_DP 9 #define DCR_DK 10 #define DCR_DX 11 #define DCR_DR 12 #define DCR_DA 13 #define DCR_DD 14 #define DCR_DEFER_ALL 0x7f00 // DCR bits 16-63 reserved #define DCR_MBZ1 2 #define DCR_MBZ1_V 0xffffffffffffi64 // Define hardware RSE Configuration Register // // RS Configuration (RSC) bit field positions #define RSC_MODE 0 #define RSC_PL 2 #define RSC_BE 4 // RSC bits 5-15 reserved #define RSC_MBZ0 5 #define RSC_MBZ0_V 0x3ff #define RSC_LOADRS 16 #define RSC_LOADRS_LEN 14 // RSC bits 30-63 reserved #define RSC_MBZ1 30 #define RSC_MBZ1_LEN 34 #define RSC_MBZ1_V 0x3ffffffffi64 // RSC modes // Lazy #define RSC_MODE_LY (0x0) // Store intensive #define RSC_MODE_SI (0x1) // Load intensive #define RSC_MODE_LI (0x2) // Eager #define RSC_MODE_EA (0x3) // RSC Endian bit values #define RSC_BE_LITTLE 0 #define RSC_BE_BIG 1 // RSC while in kernel: enabled, little endian, pl = 0, eager mode #define RSC_KERNEL ((RSC_MODE_EA<= 2 #define NESTED_SETUP(i,l,o,r) \ .##regstk i,l,o,r; \ .##prologue 0xC, loc0; \ alloc savedpfs=ar##.##pfs,i,l,o,r ;\ mov savedbrp=brp; // // Define procedure exit macros // #define LEAF_RETURN \ br##.##ret##.##sptk##.##few##.##clr brp #define NESTED_RETURN \ mov ar##.##pfs = savedpfs; \ mov brp = savedbrp; \ br##.##ret##.##sptk##.##few##.##clr brp #define LEAF_EXIT(Name) \ .##endp Name; #define NESTED_EXIT(Name) \ .##endp Name; //++ // Routine: // // LDPTR(rD, rPtr) // // Routine Description: // // load pointer value. // // Agruments: // // rD: destination register // rPtr: register containing pointer // // Return Value: // // rD = load from address [rPtr] // // Notes: // // rPtr is unchanged // //-- #ifdef _WIN64 #define LDPTR(rD, rPtr) \ ld8 rD = [rPtr] #else #define LDPTR(rD, rPtr) \ ld4 rD = [rPtr] ;\ ;; ;\ sxt4 rD = rD #endif //++ // Routine: // // LDPTRINC(rD, rPtr, imm) // // Routine Description: // // load pointer value and update base. // // Agruments: // // rD: destination register // rPtr: register containing pointer // imm: number to be incremented to base // // Return Value: // // rD = load from address [rPtr] and rPtr += imm // // Notes: // //-- #ifdef _WIN64 #define LDPTRINC(rD, rPtr, imm) \ ld8 rD = [rPtr], imm #else #define LDPTRINC(rD, rPtr, imm) \ ld4 rD = [rPtr], imm ;\ ;; ;\ sxt4 rD = rD #endif //++ // Routine: // // PLDPTRINC(rP, rD, rPtr, imm) // // Routine Description: // // predicated load pointer value and update base. // // Agruments: // // rP: predicate register // rD: destination register // rPtr: register containing pointer // imm: number to be incremented to base // // Return Value: // // if (rP) rD = load from address [rPtr] and rPtr += imm // // Notes: // //-- #ifdef _WIN64 #define PLDPTRINC(rP, rD, rPtr, imm) \ (rP) ld8 rD = [rPtr], imm #else #define PLDPTRINC(rP, rD, rPtr, imm) \ (rP) ld4 rD = [rPtr], imm ;\ ;; ;\ (rP) sxt4 rD = rD #endif //++ // Routine: // // PLDPTR(rP, rD, rPtr) // // Routine Description: // // predicated load pointer value. // // Agruments: // // rP: predicate register // rD: destination register // rPtr: register containing pointer // // Return Value: // // if (rP == 1) rD = load from address [rPtr], else NO-OP // // Notes: // // rPtr is unchanged // //-- #ifdef _WIN64 #define PLDPTR(rP, rD, rPtr) \ (rP) ld8 rD = [rPtr] #else #define PLDPTR(rP, rD, rPtr) \ (rP) ld4 rD = [rPtr] ;\ ;; ;\ (rP) sxt4 rD = rD #endif //++ // Routine: // // STPTR(rPtr, rS) // // Routine Description: // // store pointer value. // // Agruments: // // rPtr: register containing pointer // rS : source pointer value // // Return Value: // // store [rPtr] = rS // // Notes: // // rPtr is unchanged // //-- #ifdef _WIN64 #define STPTR(rPtr, rS) \ st8 [rPtr] = rS #else #define STPTR(rPtr, rS) \ st4 [rPtr] = rS #endif //++ // Routine: // // PSTPTR(rP, rPtr, rS) // // Routine Description: // // predicated store pointer value. // // Agruments: // // rP: predicate register // rPtr: register containing pointer // rS : source pointer value // // Return Value: // // if (rP) store [rPtr] = rS // // Notes: // // rPtr is unchanged // //-- #ifdef _WIN64 #define PSTPTR(rP, rPtr, rS) \ (rP) st8 [rPtr] = rS #else #define PSTPTR(rP, rPtr, rS) \ (rP) st4 [rPtr] = rS #endif //++ // Routine: // // STPTRINC(rPtr, rS, imm) // // Routine Description: // // store pointer value. // // Agruments: // // rPtr: register containing pointer // rS : source pointer value // imm: number to be incremented to base // // Return Value: // // if (rP) store [rPtr] = rS, rPtr += imm // // Notes: // //-- #ifdef _WIN64 #define STPTRINC(rPtr, rS, imm) \ st8 [rPtr] = rS, imm #else #define STPTRINC(rPtr, rS, imm) \ st4 [rPtr] = rS, imm #endif //++ // Routine: // // ARGPTR(rPtr) // // Routine Description: // // sign extend the pointer argument for WIN32 // // Agruments: // // rPtr: register containing pointer argument // // Return Value: // // // Notes: // // // //-- #ifdef _WIN64 #define ARGPTR(rPtr) #else #define ARGPTR(rPtr) \ sxt4 rPtr = rPtr #endif // // Assembler spinlock macros // //++ // Routine: // // ACQUIRE_SPINLOCK(rpLock, rOwn, Loop) // // Routine Description: // // Acquire a spinlock. Waits for lock to become free // by spinning on the cached lock value. // // Agruments: // // rpLock: pointer to the spinlock (64-bit) // rOwn: value to store in lock to indicate owner // Depending on call location, it could be: // - rpLock // - pointer to process // - pointer to thread // - pointer to PRCB // Loop: unique name for loop label // // Return Value: // // None // // Notes: // // Uses temporaries: predicates pt0, pt1, pt2, and GR t22. //-- #define ACQUIRE_SPINLOCK(rpLock, rOwn, Loop) \ cmp##.##eq pt0, pt1 = zero, zero ;\ cmp##.##eq pt2 = zero, zero ;\ ;; ;\ Loop: ;\ .pred.rel "mutex",pt0,pt1 ;\ (pt1) YIELD ;\ (pt0) xchg8 t22 = [rpLock], rOwn ;\ (pt1) ld8##.##nt1 t22 = [rpLock] ;\ ;; ;\ (pt0) cmp##.##ne pt2 = zero, t22 ;\ cmp##.##eq pt0, pt1 = zero, t22 ;\ (pt2) br##.##dpnt Loop //++ // Routine: // // RELEASE_SPINLOCK(rpLock) // // Routine Description: // // Release a spinlock by setting lock to zero. // // Agruments: // // rpLock: pointer to the spinlock. // // Return Value: // // None // // Notes: // // Uses an ordered store to ensure previous memory accesses in // critical section complete. //-- #define RELEASE_SPINLOCK(rpLock) \ st8##.##rel [rpLock] = zero //++ // Routine: // // PRELEASE_SPINLOCK(rpLock) // // Routine Description: // // Predicated release spinlock. // // Agruments: // // rpLock: pointer (swizzled) to the spinlock. // spinlock itself is 32-bit. // // Return Value: // // None // // Notes: // // Uses an ordered store to ensure previous memory accesses in // critical section complete. //-- #define PRELEASE_SPINLOCK(px, rpLock) \ (px) st8##.##rel [rpLock] = zero // // Interrupt and IRQL macros // //++ // Routine: // // END_OF_INTERRUPT // // Routine Description: // // Hook to perform end-of-interrupt processing. Currently // just writes to the EOI control register. // // Agruments: // // None // // Return Value: // // None // // Note: // // Writing EOI requires explicit data serialize. srlz must be preceded by // stop bit. //-- #define END_OF_INTERRUPT \ mov cr##.##eoi = zero ;\ ;; ;\ srlz##.##d /* Requires data srlz */ //++ // Routine: // // GET_IRQL(rOldIrql) // // Routine Description: // // Read the current IRQL by reading the TPR control register. // // Agruments: // // Register to contain the result. // // Return Value: // // rOldIrql: the current value of the IRQL. // //-- #ifndef SHADOW_IRQL_IMPLEMENTATION #define GET_IRQL(rOldIrql) \ mov rOldIrql = cr##.##tpr ;;\ extr##.##u rOldIrql = rOldIrql, TPR_MIC, TPR_MIC_LEN #else #define GET_IRQL(rOldIrql) \ movl rOldIrql = KiPcr+PcCurrentIrql;; \ ld1 rOldIrql = [rOldIrql] #endif //++ // Routine: // // SET_IRQL(rNewIrql) // // Routine Description: // // Update the IRQL by writing the TPR control register. // register t21 & t22 are used as a scratch // // Agruments: // // Register with the new IRQL value. Contains the unshifted // IRQL value (0-15). // // Return Value: // // None. // // Notes: // // Writing TPR requires explicit data serialize. srlz must be preceded by // stop bit. // //-- #ifndef SHADOW_IRQL_IMPLEMENTATION #define SET_IRQL(rNewIrql) \ dep##.##z t22 = rNewIrql, TPR_MIC, TPR_MIC_LEN;; ;\ mov cr##.##tpr = t22;; ;\ srlz##.##d #else #define SET_IRQL(rNewIrql) \ dep##.##z t22 = rNewIrql, TPR_MIC, TPR_MIC_LEN;; ;\ movl t21 = KiPcr+PcCurrentIrql;; ;\ mov cr##.##tpr = t22 ;\ st1 [t21] = rNewIrql #endif //++ // Routine: // // PSET_IRQL(pr, rNewIrql) // // Routine Description: // // Update the IRQL by writing the TPR control register, predicated // on pr // register t21 & t22 are used as a scratch // // Agruments: // // pr: predicate -- set irql if pr true. // // rNewIrql: Register with the new IRQL value. Contains the unshifted // IRQL value (0-15). // // Return Value: // // None. // // Notes: // // Relies on TPR.mi always 0. // Writing TPR requires explicit data serialize. srlz must be preceded by // stop bit. //-- #ifndef SHADOW_IRQL_IMPLEMENTATION #define PSET_IRQL(pr, rNewIrql) \ dep##.##z t22 = rNewIrql, TPR_MIC, TPR_MIC_LEN;; ;\ (pr) mov cr##.##tpr = t22;; ;\ (pr) srlz##.##d #else #define PSET_IRQL(pr, rNewIrql) \ mov t21 = rNewIrql ;\ dep##.##z t22 = rNewIrql, TPR_MIC, TPR_MIC_LEN;; ;\ (pr) mov cr##.##tpr = t22 ;\ (pr) movl t22 = KiPcr+PcCurrentIrql;; ;\ (pr) st1 [t22] = t21 #endif //++ // Routine: // // SWAP_IRQL(rNewIrql) // // Routine Description: // // get the current IRQL value and set the IRQL to the new value // register t21 and t22 are used as a scratch // // Agruments: // // Register with the new IRQL value. Contains the unshifted // IRQL value (0-15). // // Return Value: // // v0 - current IRQL // //-- #define SWAP_IRQL(rNewIrql) \ movl t22 = KiPcr+PcCurrentIrql;; ;\ ld1 v0 = [t22] ;\ dep##.##z t21 = rNewIrql, TPR_MIC, TPR_MIC_LEN;; ;\ mov cr##.##tpr = t21 ;\ st1 [t22] = rNewIrql //++ // Routine: // // GET_IRQL_FOR_VECTOR(pGet,rIrql,rVector) // // Routine Description: // // Hook to get the IRQL associated with an interrupt vector. // Currently just returns bit {7:4} of the 8-bit vector number. // // Agruments: // // pGet: Predicate: if true then get, else skip. // rIrql: Register to contain the associated IRQL. // rVector: Register containing the vector number. // // Return Value: // // rIrql: The IRQL value. A 4-bit value in bits {3:0}. All // other bits are zero. // //-- #define GET_IRQL_FOR_VECTOR(pGet,rIrql,rVector) \ (pGet) shr rIrql = rVector, VECTOR_IRQL_SHIFT //++ // Routine: // // GET_VECTOR_FOR_IRQL(pGet,rVector,rIrql) // // Routine Description: // // Hook to get the interrupt vector associated with an IRQL. // Currently just returns IRQL << 4. // // Agruments: // // pGet: Predicate: if true then get, else skip. // rVector: Register containing the associated vector number. // rIrql: Register to containing the IRQL. // // Return Value: // // rVector: The vector value. An 8-bit value in bits {7:0}. All // other bits are zero. // //-- #define GET_VECTOR_FOR_IRQL(pGet, rVector, rIrql) \ (pGet) shl rVector = rIrql, VECTOR_IRQL_SHIFT // Routine: // // REQUEST_APC_INT(pReq) // REQUEST_DISPATCH_INT(pReq) // // Routine Description: // // Request a software interrupt. Used to request // APC and DPC interrupts. // // Agruments: // // pReq: Predicate: if true then do request, else skip // // Return Value: // // None // // Notes: // // Uses temporary registers t20, t21 //-- #define REQUEST_APC_INT(pReq) \ mov t20 = 1 ;\ movl t21 = KiPcr+PcApcInterrupt ;\ ;; ;\ (pReq) st1 [t21] = t20 #define REQUEST_DISPATCH_INT(pReq) \ mov t20 = 1 ;\ movl t21 = KiPcr+PcDispatchInterrupt ;\ ;; ;\ (pReq) st1 [t21] = t20 #ifdef __assembler //++ // Routine: // // LOWER_IRQL(rNewIrql) // // Routine Description: // // Check for pending s/w interrupts and lower Irql // // Agruments: // // rNewIrql: interrupt request level // // Return Value: // // None // // Notes: // // Pending s/w interrupts are dispatched if new IRQL is low enough, // even though interrupts are disabled //-- #define LOWER_IRQL(rNewIrql) \ cmp##.##gtu pt0, pt1 = DISPATCH_LEVEL, rNewIrql ;\ movl t22 = KiPcr+PcSoftwareInterruptPending;; ;\ ld2 t22 = [t22] ;\ mov out0 = rNewIrql;; ;\ (pt0) cmp##.##ne pt0, pt1 = r0, t22 ;\ PSET_IRQL(pt1, rNewIrql) ;\ (pt0) br##.##call##.##spnt brp = KiCheckForSoftwareInterrupt //++ // // Routine: // // LEAF_LOWER_IRQL_AND_RETURN(rNewIrql) // // Routine Description: // // Check for pending s/w interrupts and lower Irql // // If a software interupt is in fact pending and would // logically fire if IRQL is lowered to the new level, // branch to code that will promote to a nested function // and handle the interrupt, otherwise, lower IRQL and // return from this leaf function. // // Agruments: // // rNewIrql: interrupt request level // // Return Value: // // None // // Notes: // // Pending s/w interrupts are dispatched if new IRQL is low enough, // even though interrupts are disabled //-- #define LEAF_LOWER_IRQL_AND_RETURN(rNewIrql) \ cmp##.##gtu pt0 = DISPATCH_LEVEL, rNewIrql ;\ movl t21 = KiPcr+PcSoftwareInterruptPending;; ;\ (pt0) rsm 1 << PSR_I ;\ (pt0) ld2 t21 = [t21] ;\ mov t22 = rNewIrql;; ;\ (pt0) cmp##.##ltu##.##unc pt1 = rNewIrql, t21 ;\ (pt1) br##.##spnt KiLowerIrqlSoftwareInterruptPending ;\ SET_IRQL(rNewIrql) ;\ ssm 1 << PSR_I ;\ br##.##ret##.##spnt##.##few##.##clr brp #endif // __assembler //******* //* //* The following macros are used in C runtime asm code //* //* beginSection - a macro for declaring and beginning a section //* .sdata is used to create short data section, if it does not exist //* //* endSection - a macro for ending a previously declared section //* //******* #define beginSection(SectName) .##section .CRT$##SectName, "a", "progbits" #define endSection(SectName) #define PublicFunction(Name) .##global Name; .##type Name,@function // XIA Begin C Initializer Sections // XIC Microsoft Reserved // XIU User // XIZ End C Initializer Sections // // XCA Begin C++ Constructor Sections // XCC Compiler (MS) // XCL Library // XCU User // XCZ End C++ Constructor Sections // // XPA Begin C Pre-Terminator Sections // XPU User // XPX Microsoft Reserved // XPZ End C Pre-Terminator Sections // // XTA Begin C Pre-Terminator Sections // XTU User // XTX Microsoft Reserved // XTZ End C Pre-Terminator Sections //