Skip to content

Commit 185ab62

Browse files
authored
Merge pull request OpenSmalltalk#562 from tesonep/p10-fix-arm32
P10 - Fix in ARM32
2 parents fdd3df0 + ee8516a commit 185ab62

File tree

2 files changed

+85
-84
lines changed

2 files changed

+85
-84
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ add_compile_definitions(
333333
PharoVM=1
334334
$<$<CONFIG:DEBUG>:DEBUGVM=1>
335335
$<$<NOT:$<CONFIG:DEBUG>>:DEBUGVM=0>
336+
_FILE_OFFSET_BITS=64
336337
)
337338

338339
#

smalltalksrc/VMMaker/CogARMCompiler.class.st

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -545,48 +545,48 @@ CogARMCompiler >> computeMaximumSize [
545545
[Stop] -> [^4].
546546

547547
"Arithmetic"
548-
[AddCqR] -> [^self rotateable8bitSignedImmediate: (operands at: 0)
549-
ifTrue: [:r :i :n| 4]
550-
ifFalse: [self literalLoadInstructionBytes + 4]].
551-
[AndCqR] -> [^self rotateable8bitBitwiseImmediate: (operands at: 0)
552-
ifTrue: [:r :i :n| 4]
548+
[AddCqR] -> [self rotateable8bitSignedImmediate: (operands at: 0)
549+
ifTrue: [:r :i :n| ^ 4]
550+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
551+
[AndCqR] -> [self rotateable8bitBitwiseImmediate: (operands at: 0)
552+
ifTrue: [:r :i :n| ^ 4]
553553
ifFalse:
554554
[self literalLoadInstructionBytes = 4
555-
ifTrue: [8]
555+
ifTrue: [^ 8]
556556
ifFalse:
557557
[1 << (operands at: 0) highBit = ((operands at: 0) + 1)
558-
ifTrue: [8]
559-
ifFalse: [self literalLoadInstructionBytes + 4]]]].
560-
[AndCqRR] -> [^self rotateable8bitBitwiseImmediate: (operands at: 0)
561-
ifTrue: [:r :i :n| 4]
558+
ifTrue: [^ 8]
559+
ifFalse: [^ self literalLoadInstructionBytes + 4]]]].
560+
[AndCqRR] -> [self rotateable8bitBitwiseImmediate: (operands at: 0)
561+
ifTrue: [:r :i :n| ^ 4]
562562
ifFalse:
563563
[self literalLoadInstructionBytes = 4
564-
ifTrue: [8]
564+
ifTrue: [^ 8]
565565
ifFalse:
566566
[1 << (operands at: 0) highBit = ((operands at: 0) + 1)
567-
ifTrue: [8]
568-
ifFalse: [self literalLoadInstructionBytes + 4]]]].
569-
[CmpCqR] -> [^self rotateable8bitSignedImmediate: (operands at: 0)
570-
ifTrue: [:r :i :n| 4]
571-
ifFalse: [self literalLoadInstructionBytes + 4]].
572-
[OrCqR] -> [^self rotateable8bitImmediate: (operands at: 0)
573-
ifTrue: [:r :i| 4]
574-
ifFalse: [self literalLoadInstructionBytes + 4]].
575-
[SubCqR] -> [^self rotateable8bitSignedImmediate: (operands at: 0)
576-
ifTrue: [:r :i :n| 4]
577-
ifFalse: [self literalLoadInstructionBytes + 4]].
578-
[TstCqR] -> [^self rotateable8bitImmediate: (operands at: 0)
579-
ifTrue: [:r :i| 4]
580-
ifFalse: [self literalLoadInstructionBytes + 4]].
581-
[XorCqR] -> [^self rotateable8bitBitwiseImmediate: (operands at: 0)
582-
ifTrue: [:r :i :n| 4]
567+
ifTrue: [^ 8]
568+
ifFalse: [^ self literalLoadInstructionBytes + 4]]]].
569+
[CmpCqR] -> [self rotateable8bitSignedImmediate: (operands at: 0)
570+
ifTrue: [:r :i :n| ^ 4]
571+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
572+
[OrCqR] -> [self rotateable8bitImmediate: (operands at: 0)
573+
ifTrue: [:r :i| ^ 4]
574+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
575+
[SubCqR] -> [self rotateable8bitSignedImmediate: (operands at: 0)
576+
ifTrue: [:r :i :n| ^ 4]
577+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
578+
[TstCqR] -> [self rotateable8bitImmediate: (operands at: 0)
579+
ifTrue: [:r :i| ^ 4]
580+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
581+
[XorCqR] -> [self rotateable8bitBitwiseImmediate: (operands at: 0)
582+
ifTrue: [:r :i :n| ^ 4]
583583
ifFalse:
584584
[self literalLoadInstructionBytes = 4
585-
ifTrue: [8]
585+
ifTrue: [^ 8]
586586
ifFalse:
587587
[1 << (operands at: 0) highBit = ((operands at: 0) + 1)
588-
ifTrue: [8]
589-
ifFalse: [self literalLoadInstructionBytes + 4]]]].
588+
ifTrue: [^ 8]
589+
ifFalse: [^ self literalLoadInstructionBytes + 4]]]].
590590
[AddCwR] -> [^self literalLoadInstructionBytes + 4].
591591
[AndCwR] -> [^self literalLoadInstructionBytes + 4].
592592
[CmpCwR] -> [^self literalLoadInstructionBytes + 4].
@@ -601,9 +601,9 @@ CogARMCompiler >> computeMaximumSize [
601601
[SubRR] -> [^4].
602602
[NegateR] -> [^4].
603603
[LoadEffectiveAddressMwrR]
604-
-> [^self rotateable8bitImmediate: (operands at: 0)
605-
ifTrue: [:r :i| 4]
606-
ifFalse: [self literalLoadInstructionBytes + 4]].
604+
-> [self rotateable8bitImmediate: (operands at: 0)
605+
ifTrue: [:r :i| ^ 4]
606+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
607607

608608
[LogicalShiftLeftCqR] -> [^4].
609609
[LogicalShiftRightCqR] -> [^4].
@@ -625,76 +625,76 @@ CogARMCompiler >> computeMaximumSize [
625625
[PopLDM] -> [^4].
626626
[PushSTM] -> [^4].
627627
"Data Movement"
628-
[MoveCqR] -> [^self literalLoadInstructionBytes = 4
629-
ifTrue: [self literalLoadInstructionBytes]
628+
[MoveCqR] -> [self literalLoadInstructionBytes = 4
629+
ifTrue: [^ self literalLoadInstructionBytes]
630630
ifFalse:
631631
[self rotateable8bitBitwiseImmediate: (operands at: 0)
632-
ifTrue: [:r :i :n| 4]
633-
ifFalse: [self literalLoadInstructionBytes]]].
634-
[MoveCwR] -> [^self literalLoadInstructionBytes = 4
635-
ifTrue: [self literalLoadInstructionBytes]
632+
ifTrue: [:r :i :n| ^ 4]
633+
ifFalse: [^ self literalLoadInstructionBytes]]].
634+
[MoveCwR] -> [self literalLoadInstructionBytes = 4
635+
ifTrue: [^ self literalLoadInstructionBytes]
636636
ifFalse:
637637
[(self inCurrentCompilation: (operands at: 0))
638-
ifTrue: [4]
639-
ifFalse: [self literalLoadInstructionBytes]]].
638+
ifTrue: [^ 4]
639+
ifFalse: [^ self literalLoadInstructionBytes]]].
640640
[MoveRR] -> [^4].
641641
[MoveRdRd] -> [^4].
642-
[MoveAwR] -> [^(self isAddressRelativeToVarBase: (operands at: 0))
643-
ifTrue: [4]
644-
ifFalse: [self literalLoadInstructionBytes + 4]].
645-
[MoveRAw] -> [^(self isAddressRelativeToVarBase: (operands at: 1))
646-
ifTrue: [4]
647-
ifFalse: [self literalLoadInstructionBytes + 4]].
648-
[MoveAbR] -> [^(self isAddressRelativeToVarBase: (operands at: 0))
649-
ifTrue: [4]
650-
ifFalse: [self literalLoadInstructionBytes + 4]].
651-
[MoveRAb] -> [^(self isAddressRelativeToVarBase: (operands at: 1))
652-
ifTrue: [4]
653-
ifFalse: [self literalLoadInstructionBytes + 4]].
654-
[MoveRMwr] -> [^self is12BitValue: (operands at: 1)
655-
ifTrue: [:u :i| 4]
656-
ifFalse: [self literalLoadInstructionBytes + 4]].
657-
[MoveRdM64r] -> [^self literalLoadInstructionBytes + 4].
658-
[MoveMbrR] -> [^self is12BitValue: (operands at: 0)
659-
ifTrue: [:u :i| 4]
660-
ifFalse: [self literalLoadInstructionBytes + 4]].
661-
[MoveRMbr] -> [^self is12BitValue: (operands at: 1)
662-
ifTrue: [:u :i| 4]
663-
ifFalse: [self literalLoadInstructionBytes + 4]].
664-
[MoveRM16r] -> [^self is12BitValue: (operands at: 1)
665-
ifTrue: [:u :i| 4]
666-
ifFalse: [self literalLoadInstructionBytes + 4]].
667-
[MoveM16rR] -> [^self rotateable8bitImmediate: (operands at: 0)
668-
ifTrue: [:r :i| 4]
669-
ifFalse: [self literalLoadInstructionBytes + 4]].
642+
[MoveAwR] -> [(self isAddressRelativeToVarBase: (operands at: 0))
643+
ifTrue: [^ 4]
644+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
645+
[MoveRAw] -> [(self isAddressRelativeToVarBase: (operands at: 1))
646+
ifTrue: [^ 4]
647+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
648+
[MoveAbR] -> [(self isAddressRelativeToVarBase: (operands at: 0))
649+
ifTrue: [^ 4]
650+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
651+
[MoveRAb] -> [(self isAddressRelativeToVarBase: (operands at: 1))
652+
ifTrue: [^ 4]
653+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
654+
[MoveRMwr] -> [self is12BitValue: (operands at: 1)
655+
ifTrue: [:u :i| ^ 4]
656+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
657+
[MoveRdM64r] -> [self literalLoadInstructionBytes + 4].
658+
[MoveMbrR] -> [self is12BitValue: (operands at: 0)
659+
ifTrue: [:u :i| ^ 4]
660+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
661+
[MoveRMbr] -> [self is12BitValue: (operands at: 1)
662+
ifTrue: [:u :i| ^ 4]
663+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
664+
[MoveRM16r] -> [self is12BitValue: (operands at: 1)
665+
ifTrue: [:u :i| ^ 4]
666+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
667+
[MoveM16rR] -> [self rotateable8bitImmediate: (operands at: 0)
668+
ifTrue: [:r :i| ^ 4]
669+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
670670
[MoveM64rRd] -> [^self literalLoadInstructionBytes + 4].
671-
[MoveMwrR] -> [^self is12BitValue: (operands at: 0)
672-
ifTrue: [:u :i| 4]
673-
ifFalse: [self literalLoadInstructionBytes + 4]].
671+
[MoveMwrR] -> [self is12BitValue: (operands at: 0)
672+
ifTrue: [:u :i| ^ 4]
673+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
674674
[MoveXbrRR] -> [^4].
675675
[MoveRXbrR] -> [^4].
676676
[MoveXwrRR] -> [^4].
677677
[MoveRXwrR] -> [^4].
678678
[PopR] -> [^4].
679679
[PushR] -> [^4].
680-
[PushCw] -> [^self literalLoadInstructionBytes = 4
681-
ifTrue: [self literalLoadInstructionBytes + 4]
680+
[PushCw] -> [self literalLoadInstructionBytes = 4
681+
ifTrue: [^ self literalLoadInstructionBytes + 4]
682682
ifFalse:
683683
[(self inCurrentCompilation: (operands at: 0))
684-
ifTrue: [8]
684+
ifTrue: [^ 8]
685685
ifFalse:
686686
[self rotateable8bitBitwiseImmediate: (operands at: 0)
687-
ifTrue: [:r :i :n| 8]
688-
ifFalse: [self literalLoadInstructionBytes + 4]]]].
689-
[PushCq] -> [^self literalLoadInstructionBytes = 4
690-
ifTrue: [self literalLoadInstructionBytes + 4]
687+
ifTrue: [:r :i :n| ^ 8]
688+
ifFalse: [^ self literalLoadInstructionBytes + 4]]]].
689+
[PushCq] -> [self literalLoadInstructionBytes = 4
690+
ifTrue: [^ self literalLoadInstructionBytes + 4]
691691
ifFalse:
692692
[self rotateable8bitBitwiseImmediate: (operands at: 0)
693-
ifTrue: [:r :i :n| 8]
694-
ifFalse: [self literalLoadInstructionBytes + 4]]].
695-
[PrefetchAw] -> [^(self isAddressRelativeToVarBase: (operands at: 0))
696-
ifTrue: [4]
697-
ifFalse: [self literalLoadInstructionBytes + 4]].
693+
ifTrue: [:r :i :n| ^ 8]
694+
ifFalse: [^ self literalLoadInstructionBytes + 4]]].
695+
[PrefetchAw] -> [(self isAddressRelativeToVarBase: (operands at: 0))
696+
ifTrue: [^ 4]
697+
ifFalse: [^ self literalLoadInstructionBytes + 4]].
698698
"Conversion"
699699
[ConvertRRd] -> [^8].
700700

0 commit comments

Comments
 (0)