Check-in [74e82127a9]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:moved last commit to better place
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:74e82127a98e12b413672cd5361d065d23ec8d3838037dc0cd5a08af8010a1d2
User & Date: grable 2018-11-01 04:59:58
Context
2018-11-01
05:02
removed jimff_test.tcl, since its tests keep changing anyway check-in: 66084d9a33 user: grable tags: trunk
04:59
moved last commit to better place check-in: 74e82127a9 user: grable tags: trunk
04:53
fixed prepare_call() and cb_callback() not counting return pointers correctly check-in: e3d41fdce5 user: grable tags: trunk
Changes

Changes to jimff-call.c.

40
41
42
43
44
45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
		av_start( AV, sym->addr, NULL, JIMFF_TYPE_VOID);
		av_ptr( AV, union jimff_result*, result);
	} else if(sym->typeinfo.returntype == JIMFF_TYPE_STRUCT) {
		av_start_struct( AV, sym->addr, sym->typeinfo.pointersizes[0], result);
		numptrs++;
	} else {
		av_start( AV, sym->addr, result, sym->typeinfo.returntype);
	}
	
	switch(sym->typeinfo.typetag[0]) {
		case 'x':	numcbs++; break;
		case 'p':
		case 'P':	numptrs++; break;

	}
	
	int arg = 0;
	const char* t;
	for( t = sym->typeinfo.typetag + 1; ; t++) {
		if(arg >= argc) goto done_with_args;
		switch(*t) {







<
<
|
|
|
|
>







40
41
42
43
44
45
46


47
48
49
50
51
52
53
54
55
56
57
58
		av_start( AV, sym->addr, NULL, JIMFF_TYPE_VOID);
		av_ptr( AV, union jimff_result*, result);
	} else if(sym->typeinfo.returntype == JIMFF_TYPE_STRUCT) {
		av_start_struct( AV, sym->addr, sym->typeinfo.pointersizes[0], result);
		numptrs++;
	} else {
		av_start( AV, sym->addr, result, sym->typeinfo.returntype);


		switch(sym->typeinfo.typetag[0]) {
			case 'x':	numcbs++; break;
			case 'p':
			case 'P':	numptrs++; break;
		}
	}
	
	int arg = 0;
	const char* t;
	for( t = sym->typeinfo.typetag + 1; ; t++) {
		if(arg >= argc) goto done_with_args;
		switch(*t) {

Changes to jimff-callback.c.

119
120
121
122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138
		result = va_arg_ptr( valist, union jimff_result*);
	} else if(cb->typeinfo.returntype == JIMFF_TYPE_STRUCT) {
		vacall_start_struct( valist, cb->typeinfo.pointersizes[0], 4, 0, __VA_START_FLAGS);
		numptrs++;
	} else {
		//NOTE:  have to do -1 on VA-types because they are 1 less than AV-types
		vacall_start( valist, cb->typeinfo.returntype - 1, __VA_START_FLAGS);
	}
	
	switch(cb->typeinfo.typetag[0]) {
		case 'x':	numcbs++; break;
		case 'p':
		case 'P':	numptrs++; break;

	}
		
#define INTERP			(cb->ctx->interp)
#define DPFLAGS(t)	(((t) == 'P') ? JIMFF_DYNAMIC_POINTER_FLAGS : 0)

// set an error on the jimff context, hopefully it will be picked up by the caller
#define SETERR(err, msg)																							\







<
<
|
|
|
|
>







119
120
121
122
123
124
125


126
127
128
129
130
131
132
133
134
135
136
137
		result = va_arg_ptr( valist, union jimff_result*);
	} else if(cb->typeinfo.returntype == JIMFF_TYPE_STRUCT) {
		vacall_start_struct( valist, cb->typeinfo.pointersizes[0], 4, 0, __VA_START_FLAGS);
		numptrs++;
	} else {
		//NOTE:  have to do -1 on VA-types because they are 1 less than AV-types
		vacall_start( valist, cb->typeinfo.returntype - 1, __VA_START_FLAGS);


		switch(cb->typeinfo.typetag[0]) {
			case 'x':	numcbs++; break;
			case 'p':
			case 'P':	numptrs++; break;
		}
	}
		
#define INTERP			(cb->ctx->interp)
#define DPFLAGS(t)	(((t) == 'P') ? JIMFF_DYNAMIC_POINTER_FLAGS : 0)

// set an error on the jimff context, hopefully it will be picked up by the caller
#define SETERR(err, msg)																							\