Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2416.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2416 Author: eem Time: 11 June 2018, 3:06:29.068448 pm UUID: 88c7bf4a-5169-4686-bc31-3e8e99bcfc17 Ancestors: VMMaker.oscog-eem.2415 More initializationOptions clean-ups. =============== Diff against VMMaker.oscog-eem.2415 =============== Item was changed: ----- Method: CogObjectRepresentationForSpur class>>declareCVarsIn: (in category 'translation') ----- declareCVarsIn: aCodeGen "Deal wuth the fact that the number of trampolines depends on IMMUTABILITY and that IMMUTABILITY can be defined at compile time. Yes, this is a mess." | current values | - self assert: (CogObjectRepresentationForSpur allSubclasses allSatisfy: - [:sc| - CogObjectRepresentationForSpur initializationOptions == sc initializationOptions]). current := InitializationOptions at: #IMMUTABILITY ifAbsent: nil. values := #(true false) collect: [:bool| InitializationOptions at: #IMMUTABILITY put: bool. self cogitClass initializeNumTrampolines. (Cogit classPool at: #NumTrampolines) printString]. current ifNil: [InitializationOptions removeKey: #IMMUTABILITY] ifNotNil: [InitializationOptions at: #IMMUTABILITY put: current]. values first ~= values last ifTrue: [aCodeGen addConstantForBinding: #NumTrampolines -> ('(IMMUTABILITY ? ' , values first , ' : ' , values last , ')')]. aCodeGen var: #ceStoreTrampolines declareC: ('#if IMMUTABILITY\sqInt ceStoreTrampolines[', NumStoreTrampolines printString, '];\#endif') withCRs! Item was changed: ----- Method: CogX64Compiler class>>initialize (in category 'class initialization') ----- initialize "Initialize various x64 instruction-related constants. [1] IA-32 IntelĀ® Architecture Software Developer's Manual Volume 2A: Instruction Set Reference, A-M" "CogX64Compiler initialize" self ~~ CogX64Compiler ifTrue: [^self]. + (InitializationOptions ifNil: [Dictionary new]) - InitializationOptions at: #ABI ifPresent: [:abi| SysV := abi asUppercase ~= #WIN64 and: [abi asUppercase ~= #'_WIN64']] ifAbsent: [SysV := true]. "Default ABI; set to true for SysV, false for WIN64/_WIN64" RAX := 0. RCX := 1. "Were they completely mad or simply sadistic?" RDX := 2. RBX := 3. RSP := 4. RBP := 5. RSI := 6. RDI := 7. R8 := 8. R9 := 9. R10 := 10. R11 := 11. R12 := 12. R13 := 13. R14 := 14. R15 := 15. XMM0L := 0. XMM1L := 1. XMM2L := 2. XMM3L := 3. XMM4L := 4. XMM5L := 5. XMM6L := 6. XMM7L := 7. XMM8L := 8. XMM9L := 9. XMM10L := 10. XMM11L := 11. XMM12L := 12. XMM13L := 13. XMM14L := 14. XMM15L := 15. "Mod R/M Mod fields. See [1] Sec 2.4, 2.5 & 2.6 & Table 2-2" ModRegInd := 0. ModRegIndSIB := 4. ModRegIndDisp32 := 5. ModRegRegDisp8 := 1. ModRegRegDisp32 := 2. ModReg := 3. "SIB Scaled Index modes. See [1] Sec 2.4, 2.5 & 2.6 & Table 2-3" SIB1 := 0. SIB2 := 1. SIB4 := 2. SIB8 := 3. "Specific instructions" self initializeSpecificOpcodes: #(CDQ IDIVR IMULRR CPUID LFENCE MFENCE SFENCE LOCK CMPXCHGAwR CMPXCHGMwrR XCHGAwR XCHGMwrR XCHGRR CLD REP MOVSB MOVSQ) in: thisContext method! |
Free forum by Nabble | Edit this page |