Added README, licenses and copyright notices.
"{ Package: 'jv:dragonfly/asm' }"
"{ NameSpace: Smalltalk }"
TestCase subclass:#AJStackAlignmentTests
instanceVariableNames:''
classVariableNames:''
poolDictionaries:'AJx86Registers'
category:'AsmJit-Tests'
!
!AJStackAlignmentTests methodsFor:'tests'!
testJumps
| asm callInfo |
asm := self newAssembler.
asm noStackFrame.
asm jmp: #foo;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
label: #foo.
^ asm generatedCode.
!
testNewProtocolForAlignedCalls
| asm callInfo |
asm := self newAssembler.
asm cdeclCall: [:call |
call
push: EAX;
push: EAX;
push: 4.
asm call: EAX.
callInfo := call.
] alignment: 32.
asm generatedCode. "to analyze instructions"
self assert: callInfo stackSize = 12.
self assert: callInfo needsAlignment
"Modified (format): / 15-12-2015 / 23:20:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!AJStackAlignmentTests methodsFor:'utility'!
newAssembler
^ AJx86Assembler new
! !