Skip to content

Commit 9d41521

Browse files
committed
CogVM source as per VMMaker.oscog-eem.3475
Extend VMCallbackContext with the relevant support for the two register value struct return convention in the x86_64 Sys V ABI.
1 parent c440057 commit 9d41521

File tree

12 files changed

+204
-96
lines changed

12 files changed

+204
-96
lines changed
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

src/spur32.cog/vmCallback.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

src/spur32.sista/vmCallback.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

src/spur32.stack/vmCallback.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3362 uuid: b8f74e14-6430-924d-93fb-2fc1cd50ba34
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

src/spur64.cog/vmCallback.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

src/spur64.sista/vmCallback.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3150 uuid: 832f44e4-6d22-4545-ae94-d8453b49d54f
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3475 uuid: 8b989602-3968-4b65-a727-59288aa8ebcf
3+
(Compiler-eem.512)
34
*/
45

56
#define VM_CALLBACK_INC 1
@@ -12,21 +13,29 @@ typedef struct _VMCallbackContext {
1213
void *savedCStackPointer;
1314
void *savedCFramePointer;
1415
union {
15-
sqIntptr_t valword;
16-
struct { int low, high; } valleint64;
17-
struct { int high, low; } valbeint64;
18-
double valflt64;
19-
struct { void *addr; sqIntptr_t size; } valstruct;
20-
}rvs;
16+
sqIntptr_t valword;
17+
struct { int low, high; } valleint64;
18+
struct { int high, low; } valbeint64;
19+
double valflt64;
20+
struct { void *addr; sqIntptr_t size; } valstruct;
21+
struct { sqIntptr_t a; sqIntptr_t b; } valstructll; // x86_64 Sys V ABI value struct register return types
22+
struct { sqIntptr_t a; double b; } valstructld;
23+
struct { double a; sqIntptr_t b; } valstructdl;
24+
struct { double a; double b; } valstructdd;
25+
}rvs;
2126
void *savedMostRecentCallbackContext;
2227
jmp_buf trampoline;
2328
jmp_buf savedReenterInterpreter;
2429
} VMCallbackContext;
2530

26-
/* The callback return type codes */
31+
// The callback return type codes
2732
#define retword 1
2833
#define retword64 2
2934
#define retdouble 3
3035
#define retstruct 4
36+
#define retstructll 5
37+
#define retstructld 6
38+
#define retstructdl 7
39+
#define retstructdd 8
3140

3241

0 commit comments

Comments
 (0)