AMD64: amd64.org_asm-include_fixes4yasm.200603221217.patch
| File amd64.org_asm-include_fixes4yasm.200603221217.patch, 7.6 kB (added by no_mayl@hotmail.com, 2 years ago) |
|---|
-
asm-includes.4yasm/aa64_crx.inc
old new 17 17 %define CR3_AVL64 (BITS_QWORD - BITS_CR3_AVL64) 18 18 19 19 %if BITS_AA64_PHYSICAL > CR3_AVL64 20 %error due to the AVL64 bits CR3 can't hold that many base address bits 20 %error "due to the AVL64 bits CR3 can't hold that many base address bits" 21 21 %endif 22 22 23 23 %define CR3_BAS_PML4 12 -
asm-includes.4yasm/aa64_desc.inc
old new 272 272 %elifidni %3,GATE 273 273 %ifidni %4,CALL 274 274 %ifidn %1,IDT64 275 %error 64 bit call gate descriptors can't reside in the IDT 275 %error "64 bit call gate descriptors can't reside in the IDT" 276 276 %endif 277 277 istruc MEM_DESC_GATE_CALL64 278 278 at MEM_DESC_GATE_CALL64.OFF_15_0, dw ((%6) & MAX_WORD) -
asm-includes.4yasm/aa64_opc_rm32.inc
old new 19 19 20 20 %define RM32_REG_R8B 8 21 21 %define RM32_REG_R9B 9 22 %define RM32_REG_R1 1B 1022 %define RM32_REG_R10B 10 23 23 %define RM32_REG_R11B 11 24 24 %define RM32_REG_R12B 12 25 25 %define RM32_REG_R13B 13 … … 28 28 29 29 %define RM32_REG_R8W 8 30 30 %define RM32_REG_R9W 9 31 %define RM32_REG_R1 1W 1031 %define RM32_REG_R10W 10 32 32 %define RM32_REG_R11W 11 33 33 %define RM32_REG_R12W 12 34 34 %define RM32_REG_R13W 13 … … 37 37 38 38 %define RM32_REG_R8D 8 39 39 %define RM32_REG_R9D 9 40 %define RM32_REG_R1 1D 1040 %define RM32_REG_R10D 10 41 41 %define RM32_REG_R11D 11 42 42 %define RM32_REG_R12D 12 43 43 %define RM32_REG_R13D 13 … … 46 46 47 47 %define RM32_REG_R8 8 48 48 %define RM32_REG_R9 9 49 %define RM32_REG_R1 11049 %define RM32_REG_R10 10 50 50 %define RM32_REG_R11 11 51 51 %define RM32_REG_R12 12 52 52 %define RM32_REG_R13 13 -
asm-includes.4yasm/aa64_paging.inc
old new 36 36 %define PMLxE_AVL64 (BITS_QWORD - BITS_PMLxE_AVL64) 37 37 38 38 %if BITS_AA64_PHYSICAL > PMLxE_AVL64 39 %error due to the AVL64 bits a PMLxE can't hold that many base address bits 39 %error "due to the AVL64 bits a PMLxE can't hold that many base address bits" 40 40 %endif 41 41 42 42 %define MASK_PMLxE_AVL64 (((1 << BITS_PMLxE_AVL64) - 1) << PMLxE_AVL64) … … 186 186 %define MASK_PDE_4KB_BAS (((1 << (BITS_AA64_PHYSICAL - PDE_4KB_BAS)) - 1) << PDE_4KB_BAS) 187 187 188 188 %if BITS_AA64_PHYSICAL > 41 189 %error the 4 MB PDE can't hold more than 41 page base address bits 189 %error "the 4 MB PDE can't hold more than 41 page base address bits" 190 190 %endif 191 191 192 192 %define MASK_PDE_4MB_BAS_HIGH (((1 << (BITS_AA64_PHYSICAL - BITS_DWORD)) - 1) << PDE_4MB_BAS_HIGH) -
asm-includes.4yasm/ia32_desc.inc
old new 425 425 %elifidni %3,SEG 426 426 %ifidni %4,CODE 427 427 %ifidn %1,IDT 428 %error code segment descriptors can't reside in the IDT 428 %error "code segment descriptors can't reside in the IDT" 429 429 %endif 430 430 istruc MEM_DESC_SEG_CODE 431 431 at MEM_DESC_SEG_CODE.LIM_15_0, dw (temp1 & MAX_WORD) … … 436 436 iend 437 437 %elifidni %4,DATA 438 438 %ifidn %1,IDT 439 %error data segment descriptors can't reside in the IDT 439 %error "data segment descriptors can't reside in the IDT" 440 440 %endif 441 441 %if (temp2 & MASK_AR_SEG_DATA_X) = MASK_AR_SEG_DATA_X 442 442 %if (temp2 & MASK_AR_SEG_DATA_W) = 0 … … 478 478 %elifidni %3,GATE 479 479 %ifidni %4,CALL 480 480 %ifidn %1,IDT 481 %error call gate descriptors can't reside in the IDT 481 %error "call gate descriptors can't reside in the IDT" 482 482 %endif 483 483 istruc MEM_DESC_GATE_CALL 484 484 at MEM_DESC_GATE_CALL.OFF_15_0, dw ((%6) & MAX_WORD) -
asm-includes.4yasm/ia32_msr.inc
old new 276 276 %define MSR_MTRR_PHYS_MASK_n_V 11 277 277 278 278 %define MASK_MSR_MTRR_PHYS_MASK_n_MASK (((1 << (BITS_IA32_PHYSICAL - MSR_MTRR_PHYS_MASK_n_MASK)) - 1) << MSR_MTRR_PHYS_MASK_n_MASK) 279 %define MASK_MSR_MTRR_PHYS_MASK_n_V ( MAX_BYTE<< MSR_MTRR_PHYS_MASK_n_V)279 %define MASK_MSR_MTRR_PHYS_MASK_n_V (1 << MSR_MTRR_PHYS_MASK_n_V) 280 280 281 281 ;------------------------------------------------------------------------------ 282 282 ; MCAR MSR bits … … 390 390 %define MSR_APIC_BASE_E 11 391 391 %define MSR_APIC_BASE_BSP 8 392 392 393 %define M SR_APIC_BASE_BASE (((1 << (BITS_IA32_PHYSICAL - MSR_APIC_BASE_BASE)) - 1) << MSR_APIC_BASE_BASE)393 %define MASK_MSR_APIC_BASE_BASE (((1 << (BITS_IA32_PHYSICAL - MSR_APIC_BASE_BASE)) - 1) << MSR_APIC_BASE_BASE) 394 394 %define MASK_MSR_APIC_BASE_E (1 << MSR_APIC_BASE_E) 395 395 %define MASK_MSR_APIC_BASE_BSP (1 << MSR_APIC_BASE_BSP) 396 396 -
asm-includes.4yasm/ia32_paging.inc
old new 123 123 %define PDE_4MB_P PxE_P 124 124 125 125 %if BITS_IA32_PHYSICAL > 41 126 %error the 4 MB PDE can't hold more than 41 page base address bits 126 %error "the 4 MB PDE can't hold more than 41 page base address bits" 127 127 %endif 128 128 129 129 %define MASK_PDE_4MB_BAS (((1 << (BITS_DWORD - PDE_4MB_BAS)) - 1) << PDE_4MB_BAS) -
asm-includes.4yasm/ia32_tss.inc
old new 145 145 %macro CALC_C_IOPB 3 ; port, offset, mask 146 146 147 147 %if (%1) < MIN_WORD 148 %error port can't be negative 148 %error "port can't be negative" 149 149 %endif 150 150 151 151 %if (%1) > (MAX_WORD + BYTES_DWORD - 1) -
asm-includes.4yasm/main.asm
old new 12 12 ; NASM stuff 13 13 ;------------------------------------------------------------------------------ 14 14 15 %locals . 15 ; not recognized by yasm: 16 ; %locals . 16 17 17 18 %define off offset ; since there is a "seg", using "off" is cleaner 18 19 … … 125 126 ;------------------------------------------------------------------------------ 126 127 127 128 %macro CHECK_C_STRUC_SIZE 2 128 %if %1_size <> (%2) 129 %error structure has unexpected size 130 %endif 129 ; yasm does not like the "%1_size" 130 ; %if %1_size <> (%2) 131 ; %error structure has unexpected size 132 ; %endif 131 133 %endmacro 132 134 133 135 ;------------------------------------------------------------------------------
