Skip to content

Commit f3947d4

Browse files
committed
CogVM source as per VMMaker.oscog-eem.2883/ClosedVMMaker-eem.112
Cogit: generateLowLevelUnlock: is unused. ARMv8 Cogit: Correctly detect if Atomic Instructions are available (at least using code that works on RPi 4). Implement the 8.0 version of ceTryLockVMOwner above LDAXR/STLXR/CLREX, adding spiffy new CBNZ/CBZ.
1 parent b0e63a8 commit f3947d4

Some content is hidden

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

42 files changed

+1255
-886
lines changed

nsspur64src/vm/cogit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
*/
44

55

nsspur64src/vm/cogitARMv8.c

Lines changed: 279 additions & 130 deletions
Large diffs are not rendered by default.

nsspur64src/vm/cogitX64SysV.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
from
4-
StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
4+
StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
55
*/
6-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a " __DATE__ ;
6+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd " __DATE__ ;
77
char *__cogitBuildInfo = __buildInfo;
88

99

@@ -1022,7 +1022,6 @@ static sqInt NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstructi
10221022
static sqInt NoDbgRegParms fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative);
10231023
static AbstractInstruction * NoDbgRegParms genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder);
10241024
static AbstractInstruction * NoDbgRegParms generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress);
1025-
static AbstractInstruction * NoDbgRegParms generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress);
10261025
static AbstractInstruction * NoDbgRegParms genMemCopytoconstantSize(AbstractInstruction * self_in_genMemCopytoconstantSize, sqInt originalSourceReg, sqInt originalDestReg, sqInt size);
10271026
static AbstractInstruction * NoDbgRegParms genMemCopytosize(AbstractInstruction * self_in_genMemCopytosize, sqInt originalSourceReg, sqInt originalDestReg, sqInt originalSize);
10281027
static AbstractInstruction * NoDbgRegParms genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest);
@@ -24580,23 +24579,6 @@ generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, s
2458024579
return self_in_generateLowLevelTryLock;
2458124580
}
2458224581

24583-
/* CogX64Compiler>>#generateLowLevelUnlock: */
24584-
static AbstractInstruction * NoDbgRegParms
24585-
generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress)
24586-
{
24587-
AbstractInstruction *anInstruction;
24588-
24589-
if (vmOwnerLockAddress != 0) {
24590-
/* begin checkQuickConstant:forInstruction: */
24591-
anInstruction = genoperandoperand(MoveCqR, 0, RAX);
24592-
genoperandoperand(MoveRAwNoVBR, RAX, vmOwnerLockAddress);
24593-
gen(SFENCE);
24594-
}
24595-
/* begin RetN: */
24596-
genoperand(RetN, 0);
24597-
return self_in_generateLowLevelUnlock;
24598-
}
24599-
2460024582

2460124583
/* Get the abstract registers for ECX, EDI and ESI */
2460224584

nsspur64src/vm/cogitX64WIN64.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
from
4-
StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
4+
StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
55
*/
6-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a " __DATE__ ;
6+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd " __DATE__ ;
77
char *__cogitBuildInfo = __buildInfo;
88

99

@@ -1022,7 +1022,6 @@ static sqInt NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstructi
10221022
static sqInt NoDbgRegParms fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative);
10231023
static AbstractInstruction * NoDbgRegParms genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder);
10241024
static AbstractInstruction * NoDbgRegParms generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress);
1025-
static AbstractInstruction * NoDbgRegParms generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress);
10261025
static AbstractInstruction * NoDbgRegParms genMemCopytoconstantSize(AbstractInstruction * self_in_genMemCopytoconstantSize, sqInt originalSourceReg, sqInt originalDestReg, sqInt size);
10271026
static AbstractInstruction * NoDbgRegParms genMemCopytosize(AbstractInstruction * self_in_genMemCopytosize, sqInt originalSourceReg, sqInt originalDestReg, sqInt originalSize);
10281027
static AbstractInstruction * NoDbgRegParms genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest);
@@ -24598,23 +24597,6 @@ generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, s
2459824597
return self_in_generateLowLevelTryLock;
2459924598
}
2460024599

24601-
/* CogX64Compiler>>#generateLowLevelUnlock: */
24602-
static AbstractInstruction * NoDbgRegParms
24603-
generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress)
24604-
{
24605-
AbstractInstruction *anInstruction;
24606-
24607-
if (vmOwnerLockAddress != 0) {
24608-
/* begin checkQuickConstant:forInstruction: */
24609-
anInstruction = genoperandoperand(MoveCqR, 0, RAX);
24610-
genoperandoperand(MoveRAwNoVBR, RAX, vmOwnerLockAddress);
24611-
gen(SFENCE);
24612-
}
24613-
/* begin RetN: */
24614-
genoperand(RetN, 0);
24615-
return self_in_generateLowLevelUnlock;
24616-
}
24617-
2461824600

2461924601
/* Get the abstract registers for ECX, EDI and ESI */
2462024602

nsspursrc/vm/cogit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
*/
44

55

nsspursrc/vm/cogitARMv5.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
from
4-
StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
4+
StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
55
*/
6-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a " __DATE__ ;
6+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd " __DATE__ ;
77
char *__cogitBuildInfo = __buildInfo;
88

99

nsspursrc/vm/cogitIA32.c

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
from
4-
StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
4+
StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
55
*/
6-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a " __DATE__ ;
6+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd " __DATE__ ;
77
char *__cogitBuildInfo = __buildInfo;
88

99

@@ -509,7 +509,6 @@ static sqInt NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstructi
509509
static sqInt NoDbgRegParms fullCallsAreRelative(AbstractInstruction * self_in_fullCallsAreRelative);
510510
static AbstractInstruction * NoDbgRegParms genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder);
511511
static AbstractInstruction * NoDbgRegParms generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress);
512-
static AbstractInstruction * NoDbgRegParms generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress);
513512
static AbstractInstruction * NoDbgRegParms genMemCopytoconstantSize(AbstractInstruction * self_in_genMemCopytoconstantSize, sqInt originalSourceReg, sqInt originalDestReg, sqInt size);
514513
static AbstractInstruction * NoDbgRegParms genMemCopytosize(AbstractInstruction * self_in_genMemCopytosize, sqInt originalSourceReg, sqInt originalDestReg, sqInt originalSize);
515514
static AbstractInstruction * NoDbgRegParms genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest);
@@ -6409,24 +6408,6 @@ generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, s
64096408
return self_in_generateLowLevelTryLock;
64106409
}
64116410

6412-
/* CogIA32Compiler>>#generateLowLevelUnlock: */
6413-
static AbstractInstruction * NoDbgRegParms
6414-
generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress)
6415-
{
6416-
AbstractInstruction *anInstruction;
6417-
AbstractInstruction *anInstruction1;
6418-
6419-
if (vmOwnerLockAddress != 0) {
6420-
/* begin checkQuickConstant:forInstruction: */
6421-
anInstruction = genoperandoperand(MoveCqR, 0, EAX);
6422-
/* begin checkLiteral:forInstruction: */
6423-
anInstruction1 = genoperandoperand(MoveRAw, EAX, vmOwnerLockAddress);
6424-
gen(SFENCE);
6425-
}
6426-
genoperand(RetN, 0);
6427-
return self_in_generateLowLevelUnlock;
6428-
}
6429-
64306411

64316412
/* Get the abstract registers for ECX, EDI and ESI */
64326413

nsspursrc/vm/cogitMIPSEL.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
from
4-
StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
4+
StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
55
*/
6-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a " __DATE__ ;
6+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd " __DATE__ ;
77
char *__cogitBuildInfo = __buildInfo;
88

99

@@ -6063,7 +6063,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand,
60636063
static sqInt NoDbgRegParms
60646064
cPICCompactAndIsNowEmpty(CogMethod *cPIC)
60656065
{
6066-
sqInt entryPoint;
6066+
usqInt entryPoint;
60676067
sqInt followingAddress;
60686068
sqInt i;
60696069
sqInt methods[MaxCPICCases];
@@ -10372,7 +10372,7 @@ static void NoDbgRegParms
1037210372
relocateCallsInClosedPIC(CogMethod *cPIC)
1037310373
{
1037410374
sqInt callDelta;
10375-
sqInt entryPoint;
10375+
usqInt entryPoint;
1037610376
sqInt i;
1037710377
sqInt pc;
1037810378
sqLong refDelta;

spur64src/vm/cogit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2880 uuid: 6baaab83-7f09-434a-9db1-affff34cc15a
2+
CCodeGenerator VMMaker.oscog-eem.2883 uuid: 178413b2-f5ef-4ea3-b7ee-f820c36333dd
33
*/
44

55

0 commit comments

Comments
 (0)