Skip to content

Commit 81d66a6

Browse files
committed
CogVM source as per VMMaker.oscog-eem.3658
Cogit: inline previousInstruction and noteFollowingConditionalBranch: since both are only used once if at all. Stack Interpreter: fix the cast in initializeStack:numSlots:pageSize: to match that of teh CoInterpreter's given the below Slang changes. Slang: Fix the ARMv8 Windows 11 bug which was due to undefined behaviour. I had neglected to ensure Slang respects Smalltalk evaluation order for translations of struct sends. The previousInstruction send in Cogit>>#genConditionalBranch:operand: must precede the gen:operand: send. Slang passed both of these as parameters, generating: return noteFollowingConditionalBranch(previousInstruction(), genoperand(opcode, operandOne)); Clang on macOS chose a different order of evaluation than Windows 11, masking the error. Given ensureEvaluationOrderOfExplicitReceiverSendsIn:'s type check change all #'CogSimStackEntry *' type references to #'SimStackEntry *' so that only #'SimStackEntry *' is used.
1 parent 8ff511c commit 81d66a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1549
-1429
lines changed

src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
VMPluginCodeGenerator VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
3-
(* Compiler-eem.518)
2+
VMPluginCodeGenerator VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
3+
(Compiler-eem.520)
44
from
5-
ThreadedARM64AppleFFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
5+
ThreadedARM64AppleFFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
66
*/
7-
static char __buildInfo[] = "ThreadedARM64AppleFFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a " __DATE__ ;
7+
static char __buildInfo[] = "ThreadedARM64AppleFFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab " __DATE__ ;
88

99

1010
#include "config.h"
@@ -178,7 +178,7 @@ static char __buildInfo[] = "ThreadedARM64AppleFFIPlugin VMMaker.oscog-eem.3601
178178
#define MaxNumArgs 15
179179
#define NumFloatRegArgs 8
180180
#define NumIntRegArgs 8
181-
#define PluginVersionInfo " VMMaker.oscog-eem.3601"
181+
#define PluginVersionInfo " VMMaker.oscog-eem.3658"
182182

183183
typedef struct {
184184
char *argVector;
@@ -547,7 +547,7 @@ extern sqInt trueObject(void);
547547
extern
548548
#endif
549549
struct VirtualMachine* interpreterProxy;
550-
static const char *moduleName = "ARM64AppleFFIPlugin VMMaker.oscog-eem.3601 " INT_EXT;
550+
static const char *moduleName = "ARM64AppleFFIPlugin VMMaker.oscog-eem.3658 " INT_EXT;
551551
static sqInt nilObj;
552552

553553

@@ -4580,17 +4580,13 @@ structIsHomogenousFloatArrayOfSizetypeSpecofLength(sqInt structSize, unsigned in
45804580
unsigned int firstField;
45814581
sqInt idx;
45824582
unsigned int typeOfFirstField;
4583-
sqInt typeSpec;
45844583

45854584
if (!(argSpecSize <= 5)) {
45864585
return 0;
45874586
}
45884587

45894588
/* header plus up to four fields */
4590-
typeSpec = (firstField = argSpec[1]);
4591-
4592-
/* begin atomicTypeOf: */
4593-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4589+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
45944590
if ((typeOfFirstField != FFITypeSingleFloat)
45954591
&& (typeOfFirstField != FFITypeDoubleFloat)) {
45964592
return 0;
@@ -4653,15 +4649,11 @@ structIsHomogenousIntegerArrayOfSizetypeSpecofLength(sqInt structSize, unsigned
46534649
sqInt idx;
46544650
sqInt sizeOfType;
46554651
unsigned int typeOfFirstField;
4656-
sqInt typeSpec;
46574652

46584653
if (!(structSize <= (4 * (sizeof(long))))) {
46594654
return 0;
46604655
}
4661-
typeSpec = (firstField = argSpec[1]);
4662-
4663-
/* begin atomicTypeOf: */
4664-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4656+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
46654657
if (!(((typeOfFirstField >= FFITypeUnsignedInt8) && (typeOfFirstField <= FFITypeSignedInt64)))) {
46664658
return 0;
46674659
}

src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
VMPluginCodeGenerator VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
3-
(* Compiler-eem.518)
2+
VMPluginCodeGenerator VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
3+
(Compiler-eem.520)
44
from
5-
ThreadedARM64FFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
5+
ThreadedARM64FFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
66
*/
7-
static char __buildInfo[] = "ThreadedARM64FFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a " __DATE__ ;
7+
static char __buildInfo[] = "ThreadedARM64FFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab " __DATE__ ;
88

99

1010
#include "config.h"
@@ -178,7 +178,7 @@ static char __buildInfo[] = "ThreadedARM64FFIPlugin VMMaker.oscog-eem.3601 uuid:
178178
#define MaxNumArgs 15
179179
#define NumFloatRegArgs 8
180180
#define NumIntRegArgs 8
181-
#define PluginVersionInfo " VMMaker.oscog-eem.3601"
181+
#define PluginVersionInfo " VMMaker.oscog-eem.3658"
182182

183183
typedef struct {
184184
char *argVector;
@@ -547,7 +547,7 @@ extern sqInt trueObject(void);
547547
extern
548548
#endif
549549
struct VirtualMachine* interpreterProxy;
550-
static const char *moduleName = "ARM64FFIPlugin VMMaker.oscog-eem.3601 " INT_EXT;
550+
static const char *moduleName = "ARM64FFIPlugin VMMaker.oscog-eem.3658 " INT_EXT;
551551
static sqInt nilObj;
552552

553553

@@ -4411,17 +4411,13 @@ structIsHomogenousFloatArrayOfSizetypeSpecofLength(sqInt structSize, unsigned in
44114411
unsigned int firstField;
44124412
sqInt idx;
44134413
unsigned int typeOfFirstField;
4414-
sqInt typeSpec;
44154414

44164415
if (!(argSpecSize <= 5)) {
44174416
return 0;
44184417
}
44194418

44204419
/* header plus up to four fields */
4421-
typeSpec = (firstField = argSpec[1]);
4422-
4423-
/* begin atomicTypeOf: */
4424-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4420+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
44254421
if ((typeOfFirstField != FFITypeSingleFloat)
44264422
&& (typeOfFirstField != FFITypeDoubleFloat)) {
44274423
return 0;
@@ -4484,15 +4480,11 @@ structIsHomogenousIntegerArrayOfSizetypeSpecofLength(sqInt structSize, unsigned
44844480
sqInt idx;
44854481
sqInt sizeOfType;
44864482
unsigned int typeOfFirstField;
4487-
sqInt typeSpec;
44884483

44894484
if (!(structSize <= (4 * (sizeof(long))))) {
44904485
return 0;
44914486
}
4492-
typeSpec = (firstField = argSpec[1]);
4493-
4494-
/* begin atomicTypeOf: */
4495-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4487+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
44964488
if (!(((typeOfFirstField >= FFITypeUnsignedInt8) && (typeOfFirstField <= FFITypeSignedInt64)))) {
44974489
return 0;
44984490
}

src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
VMPluginCodeGenerator VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
3-
(* Compiler-eem.518)
2+
VMPluginCodeGenerator VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
3+
(Compiler-eem.520)
44
from
5-
ThreadedRiscV64FFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a
5+
ThreadedRiscV64FFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
66
*/
7-
static char __buildInfo[] = "ThreadedRiscV64FFIPlugin VMMaker.oscog-eem.3601 uuid: 6617a9c2-d1a4-4065-87c1-65631276475a " __DATE__ ;
7+
static char __buildInfo[] = "ThreadedRiscV64FFIPlugin VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab " __DATE__ ;
88

99

1010
#include "config.h"
@@ -178,7 +178,7 @@ static char __buildInfo[] = "ThreadedRiscV64FFIPlugin VMMaker.oscog-eem.3601 uui
178178
#define MaxNumArgs 15
179179
#define NumFloatRegArgs 8
180180
#define NumIntRegArgs 8
181-
#define PluginVersionInfo " VMMaker.oscog-eem.3601"
181+
#define PluginVersionInfo " VMMaker.oscog-eem.3658"
182182

183183
typedef struct {
184184
char *argVector;
@@ -546,7 +546,7 @@ extern sqInt trueObject(void);
546546
extern
547547
#endif
548548
struct VirtualMachine* interpreterProxy;
549-
static const char *moduleName = "RiscV64FFIPlugin VMMaker.oscog-eem.3601 " INT_EXT;
549+
static const char *moduleName = "RiscV64FFIPlugin VMMaker.oscog-eem.3658 " INT_EXT;
550550
static sqInt nilObj;
551551

552552

@@ -4447,17 +4447,13 @@ structIsHomogenousFloatArrayOfSizetypeSpecofLength(sqInt structSize, unsigned in
44474447
unsigned int firstField;
44484448
sqInt idx;
44494449
unsigned int typeOfFirstField;
4450-
sqInt typeSpec;
44514450

44524451
if (!(argSpecSize <= 5)) {
44534452
return 0;
44544453
}
44554454

44564455
/* header plus up to four fields */
4457-
typeSpec = (firstField = argSpec[1]);
4458-
4459-
/* begin atomicTypeOf: */
4460-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4456+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
44614457
if ((typeOfFirstField != FFITypeSingleFloat)
44624458
&& (typeOfFirstField != FFITypeDoubleFloat)) {
44634459
return 0;
@@ -4520,15 +4516,11 @@ structIsHomogenousIntegerArrayOfSizetypeSpecofLength(sqInt structSize, unsigned
45204516
sqInt idx;
45214517
sqInt sizeOfType;
45224518
unsigned int typeOfFirstField;
4523-
sqInt typeSpec;
45244519

45254520
if (!(structSize <= (4 * (sizeof(long))))) {
45264521
return 0;
45274522
}
4528-
typeSpec = (firstField = argSpec[1]);
4529-
4530-
/* begin atomicTypeOf: */
4531-
typeOfFirstField = ((usqInt)((typeSpec & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
4523+
typeOfFirstField = ((usqInt)((((firstField = argSpec[1])) & FFIAtomicTypeMask))) >> FFIAtomicTypeShift;
45324524
if (!(((typeOfFirstField >= FFITypeUnsignedInt8) && (typeOfFirstField <= FFITypeSignedInt64)))) {
45334525
return 0;
45344526
}

src/spur32.cog.lowcode/cogit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.3651 uuid: 458bd6a5-d007-40a7-a740-b675bf61101d
3-
(Cog-eem.499, * Compiler-ct.519)
2+
CCodeGenerator VMMaker.oscog-eem.3658 uuid: fe32aec6-a1d5-4e6a-814c-287d3f6467ab
3+
(Cog-eem.501, Compiler-eem.520)
44
*/
55

66

0 commit comments

Comments
 (0)