remote TABs in doc/ and test/
This commit is contained in:
@@ -288,17 +288,17 @@ void c_minus1(void)
|
||||
printf("(long0 != -1)\n");
|
||||
if(long0 != -1)
|
||||
{
|
||||
failures++;
|
||||
failures++;
|
||||
}
|
||||
printf("(long0 > 0)\n");
|
||||
if(long0 > 0)
|
||||
{
|
||||
failures++;
|
||||
failures++;
|
||||
}
|
||||
printf("(long1 < 0)\n");
|
||||
if(long1 < 0)
|
||||
{
|
||||
failures++;
|
||||
failures++;
|
||||
}
|
||||
/*
|
||||
if(long1 < 2)
|
||||
|
||||
@@ -101,9 +101,9 @@ int s22(struct defs *pd0)
|
||||
#define cq_sections 1
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s22(pd0);
|
||||
@@ -125,7 +125,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -243,9 +243,9 @@ int s241(struct defs *pd0) {
|
||||
#define cq_sections 1
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s241(pd0);
|
||||
@@ -267,7 +267,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -176,21 +176,21 @@ int s243(struct defs *pd0) {
|
||||
by a more failproof version
|
||||
|
||||
if(
|
||||
'\0' != 0 ||
|
||||
'\01' != 1 ||
|
||||
'\02' != 2 ||
|
||||
'\03' != 3 ||
|
||||
'\04' != 4 ||
|
||||
'\05' != 5 ||
|
||||
'\06' != 6 ||
|
||||
'\07' != 7 ||
|
||||
'\10' != 8 ||
|
||||
'\17' != 15 ||
|
||||
'\20' != 16 ||
|
||||
'\77' != 63 ||
|
||||
'\100' != 64 ||
|
||||
'\177' != 127
|
||||
)
|
||||
'\0' != 0 ||
|
||||
'\01' != 1 ||
|
||||
'\02' != 2 ||
|
||||
'\03' != 3 ||
|
||||
'\04' != 4 ||
|
||||
'\05' != 5 ||
|
||||
'\06' != 6 ||
|
||||
'\07' != 7 ||
|
||||
'\10' != 8 ||
|
||||
'\17' != 15 ||
|
||||
'\20' != 16 ||
|
||||
'\77' != 63 ||
|
||||
'\100' != 64 ||
|
||||
'\177' != 127
|
||||
)
|
||||
*/
|
||||
if(
|
||||
('0' != '\60') ||
|
||||
@@ -201,7 +201,7 @@ int s243(struct defs *pd0) {
|
||||
('z' != '\172')
|
||||
)
|
||||
|
||||
{
|
||||
{
|
||||
rc = rc+8;
|
||||
if(pd0->flgd != 0)
|
||||
{
|
||||
@@ -221,9 +221,9 @@ int s243(struct defs *pd0) {
|
||||
#define cq_sections 1
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s243(pd0);
|
||||
@@ -245,7 +245,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -116,9 +116,9 @@ s244(struct defs *pd0) {
|
||||
#define cq_sections 1
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s244(pd0);
|
||||
@@ -140,7 +140,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -128,9 +128,9 @@ int s25(struct defs *pd0) {
|
||||
#define cq_sections 1
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s25(pd0);
|
||||
@@ -152,7 +152,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -171,9 +171,9 @@ s26(struct defs *pd0) {
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s26(pd0);
|
||||
@@ -197,7 +197,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -317,9 +317,9 @@ setev(){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s26(pd0);
|
||||
@@ -344,7 +344,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -140,9 +140,9 @@ simply discarded. */
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
/*case 0: return s26(pd0);*/
|
||||
@@ -167,7 +167,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -291,9 +291,9 @@ int s626(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s26(pd0);
|
||||
@@ -318,7 +318,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -194,9 +194,9 @@ int
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
/*case 0: return s26(pd0);*/
|
||||
@@ -221,7 +221,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
342
test/val/cq714.c
342
test/val/cq714.c
@@ -1507,175 +1507,175 @@ initial (5,2) | (5,2) | (12,10)
|
||||
}
|
||||
|
||||
#ifdef NO_FLOATS
|
||||
fl = 5; cr = 2;
|
||||
fl /= cr;
|
||||
if(fl != 2){
|
||||
lrc = 232;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; sr = 2;
|
||||
fl /= sr;
|
||||
if(fl != 2){
|
||||
lrc = 233;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ir = 2;
|
||||
fl /= ir;
|
||||
if(fl != 2){
|
||||
lrc = 234;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; lr = 2;
|
||||
fl /= lr;
|
||||
if(fl != 2){
|
||||
lrc = 235;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ur = 2;
|
||||
fl /= ur;
|
||||
if(fl != 2){
|
||||
lrc = 236;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; fr = 2;
|
||||
fl /= fr;
|
||||
if(fl != 2){
|
||||
lrc = 237;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; dr = 2;
|
||||
fl /= dr;
|
||||
if(fl != 2){
|
||||
lrc = 238;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; cr = 2;
|
||||
dl /= cr;
|
||||
if(dl != 2){
|
||||
lrc = 239;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; sr = 2;
|
||||
dl /= sr;
|
||||
if(dl != 2){
|
||||
lrc = 240;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ir = 2;
|
||||
dl /= ir;
|
||||
if(dl != 2){
|
||||
lrc = 241;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; lr = 2;
|
||||
dl /= lr;
|
||||
if(dl != 2){
|
||||
lrc = 242;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ur = 2;
|
||||
dl /= ur;
|
||||
if(dl != 2){
|
||||
lrc = 243;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; fr = 2;
|
||||
dl /= fr;
|
||||
if(dl != 2){
|
||||
lrc = 244;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; dr = 2;
|
||||
dl /= dr;
|
||||
if(dl != 2){
|
||||
lrc = 245;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; cr = 2;
|
||||
fl /= cr;
|
||||
if(fl != 2){
|
||||
lrc = 232;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; sr = 2;
|
||||
fl /= sr;
|
||||
if(fl != 2){
|
||||
lrc = 233;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ir = 2;
|
||||
fl /= ir;
|
||||
if(fl != 2){
|
||||
lrc = 234;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; lr = 2;
|
||||
fl /= lr;
|
||||
if(fl != 2){
|
||||
lrc = 235;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ur = 2;
|
||||
fl /= ur;
|
||||
if(fl != 2){
|
||||
lrc = 236;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; fr = 2;
|
||||
fl /= fr;
|
||||
if(fl != 2){
|
||||
lrc = 237;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; dr = 2;
|
||||
fl /= dr;
|
||||
if(fl != 2){
|
||||
lrc = 238;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; cr = 2;
|
||||
dl /= cr;
|
||||
if(dl != 2){
|
||||
lrc = 239;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; sr = 2;
|
||||
dl /= sr;
|
||||
if(dl != 2){
|
||||
lrc = 240;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ir = 2;
|
||||
dl /= ir;
|
||||
if(dl != 2){
|
||||
lrc = 241;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; lr = 2;
|
||||
dl /= lr;
|
||||
if(dl != 2){
|
||||
lrc = 242;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ur = 2;
|
||||
dl /= ur;
|
||||
if(dl != 2){
|
||||
lrc = 243;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; fr = 2;
|
||||
dl /= fr;
|
||||
if(dl != 2){
|
||||
lrc = 244;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; dr = 2;
|
||||
dl /= dr;
|
||||
if(dl != 2){
|
||||
lrc = 245;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
#else
|
||||
fl = 5; cr = 2;
|
||||
fl /= cr;
|
||||
if(fl != 2.5){
|
||||
lrc = 232;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; sr = 2;
|
||||
fl /= sr;
|
||||
if(fl != 2.5){
|
||||
lrc = 233;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ir = 2;
|
||||
fl /= ir;
|
||||
if(fl != 2.5){
|
||||
lrc = 234;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; lr = 2;
|
||||
fl /= lr;
|
||||
if(fl != 2.5){
|
||||
lrc = 235;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ur = 2;
|
||||
fl /= ur;
|
||||
if(fl != 2.5){
|
||||
lrc = 236;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; fr = 2;
|
||||
fl /= fr;
|
||||
if(fl != 2.5){
|
||||
lrc = 237;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; dr = 2;
|
||||
fl /= dr;
|
||||
if(fl != 2.5){
|
||||
lrc = 238;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; cr = 2;
|
||||
dl /= cr;
|
||||
if(dl != 2.5){
|
||||
lrc = 239;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; sr = 2;
|
||||
dl /= sr;
|
||||
if(dl != 2.5){
|
||||
lrc = 240;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ir = 2;
|
||||
dl /= ir;
|
||||
if(dl != 2.5){
|
||||
lrc = 241;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; lr = 2;
|
||||
dl /= lr;
|
||||
if(dl != 2.5){
|
||||
lrc = 242;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ur = 2;
|
||||
dl /= ur;
|
||||
if(dl != 2.5){
|
||||
lrc = 243;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; fr = 2;
|
||||
dl /= fr;
|
||||
if(dl != 2.5){
|
||||
lrc = 244;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; dr = 2;
|
||||
dl /= dr;
|
||||
if(dl != 2.5){
|
||||
lrc = 245;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; cr = 2;
|
||||
fl /= cr;
|
||||
if(fl != 2.5){
|
||||
lrc = 232;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; sr = 2;
|
||||
fl /= sr;
|
||||
if(fl != 2.5){
|
||||
lrc = 233;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ir = 2;
|
||||
fl /= ir;
|
||||
if(fl != 2.5){
|
||||
lrc = 234;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; lr = 2;
|
||||
fl /= lr;
|
||||
if(fl != 2.5){
|
||||
lrc = 235;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; ur = 2;
|
||||
fl /= ur;
|
||||
if(fl != 2.5){
|
||||
lrc = 236;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; fr = 2;
|
||||
fl /= fr;
|
||||
if(fl != 2.5){
|
||||
lrc = 237;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
fl = 5; dr = 2;
|
||||
fl /= dr;
|
||||
if(fl != 2.5){
|
||||
lrc = 238;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; cr = 2;
|
||||
dl /= cr;
|
||||
if(dl != 2.5){
|
||||
lrc = 239;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; sr = 2;
|
||||
dl /= sr;
|
||||
if(dl != 2.5){
|
||||
lrc = 240;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ir = 2;
|
||||
dl /= ir;
|
||||
if(dl != 2.5){
|
||||
lrc = 241;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; lr = 2;
|
||||
dl /= lr;
|
||||
if(dl != 2.5){
|
||||
lrc = 242;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; ur = 2;
|
||||
dl /= ur;
|
||||
if(dl != 2.5){
|
||||
lrc = 243;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; fr = 2;
|
||||
dl /= fr;
|
||||
if(dl != 2.5){
|
||||
lrc = 244;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
dl = 5; dr = 2;
|
||||
dl /= dr;
|
||||
if(dl != 2.5){
|
||||
lrc = 245;
|
||||
if(prlc) printf(f,lrc);
|
||||
}
|
||||
#endif
|
||||
cl = 5; cr = 2;
|
||||
cl %= cr;
|
||||
@@ -1750,9 +1750,9 @@ initial (5,2) | (5,2) | (12,10)
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s714(pd0);
|
||||
@@ -1776,7 +1776,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -971,9 +971,9 @@ initial (5,2) | (5,2) | (12,10)
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s714(pd0);
|
||||
@@ -997,7 +997,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -105,9 +105,9 @@ int x, y, z;
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
/*case 0: return s26(pd0);*/
|
||||
@@ -132,7 +132,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -299,9 +299,9 @@ int s72(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s26(pd0);
|
||||
@@ -326,7 +326,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -289,9 +289,9 @@ int s757(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s26(pd0);
|
||||
|
||||
@@ -336,9 +336,9 @@ int s7813(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s7813(pd0);
|
||||
@@ -362,7 +362,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -682,9 +682,9 @@ test is unreliable. */
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s81(pd0);
|
||||
@@ -708,7 +708,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -101,13 +101,13 @@ int s84(struct defs *pd0){
|
||||
if(pd0->flgd != 0) printf(s84er,2);
|
||||
rc = rc+2;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
pfi = glork;
|
||||
if((*pfi)(4) != 4){
|
||||
if(pd0->flgd != 0) printf(s84er,2);
|
||||
rc = rc+2;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Float fa[17] declares an array of floating point
|
||||
numbers, and *afp[17] declares an array of pointers
|
||||
@@ -223,9 +223,9 @@ return x;}
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s84(pd0);
|
||||
@@ -249,7 +249,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -118,10 +118,10 @@ int s85(struct defs *pd0){
|
||||
#ifdef NO_FLOATS
|
||||
"signed",
|
||||
"signed",
|
||||
#else
|
||||
#else
|
||||
"float",
|
||||
"double"
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static char aln[] = " alignment: ";
|
||||
@@ -205,12 +205,12 @@ int s85(struct defs *pd0){
|
||||
if(pd0->flgm != 0) printf("Sign extension in fields\n");
|
||||
}
|
||||
else{
|
||||
#ifdef NO_BITFIELDS
|
||||
if(pd0->flgd != 0) printf("NO_BITFIELDS\n");
|
||||
#else
|
||||
if(pd0->flgd != 0) printf(s85er,2);
|
||||
rc = rc+2;
|
||||
#endif
|
||||
#ifdef NO_BITFIELDS
|
||||
if(pd0->flgd != 0) printf("NO_BITFIELDS\n");
|
||||
#else
|
||||
if(pd0->flgd != 0) printf(s85er,2);
|
||||
rc = rc+2;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,9 +268,9 @@ int one();
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s85(pd0);
|
||||
@@ -294,7 +294,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -183,9 +183,9 @@ int *metricp;
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s86(pd0);
|
||||
@@ -209,7 +209,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -139,9 +139,9 @@ int s88(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s88(pd0);
|
||||
@@ -165,7 +165,7 @@ int main(int n,char **args) {
|
||||
|
||||
int j;
|
||||
static struct defs d0, *pd0;
|
||||
|
||||
|
||||
d0.flgs = 1; /* These flags dictate */
|
||||
d0.flgm = 1; /* the verbosity of */
|
||||
d0.flgd = 1; /* the program. */
|
||||
|
||||
@@ -109,9 +109,9 @@ int s9(struct defs *pd0){
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef NO_TYPELESS_STRUCT_PTR
|
||||
int section(int j,struct* pd0){
|
||||
int section(int j,struct* pd0){
|
||||
#else
|
||||
int section(int j,void* pd0){
|
||||
int section(int j,void* pd0){
|
||||
#endif
|
||||
switch(j){
|
||||
case 0: return s9(pd0);
|
||||
|
||||
@@ -660,10 +660,10 @@ static unsigned char buf[18830];
|
||||
|
||||
int main() {
|
||||
|
||||
unsigned long cksum = adler32(0, NULL, 0);
|
||||
unsigned long cksum = adler32(0, NULL, 0);
|
||||
|
||||
decompress_lz4(compressed, buf, 18830);
|
||||
cksum = adler32(cksum, buf, 18830);
|
||||
decompress_lz4(compressed, buf, 18830);
|
||||
cksum = adler32(cksum, buf, 18830);
|
||||
|
||||
return cksum == 0xf748269d ? 0 : 1;
|
||||
return cksum == 0xf748269d ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ unsigned char uchar1 = 0;
|
||||
|
||||
void dput(unsigned char val)
|
||||
{
|
||||
/*PORTB = val;
|
||||
PORTA = 0x01;
|
||||
PORTA = 0x00;
|
||||
*/
|
||||
/*PORTB = val;
|
||||
PORTA = 0x01;
|
||||
PORTA = 0x00;
|
||||
*/
|
||||
}
|
||||
|
||||
void done()
|
||||
@@ -35,104 +35,104 @@ void done()
|
||||
/* both loops use the loop variable inside the inner loop */
|
||||
void for1(void)
|
||||
{
|
||||
unsigned char i, j;
|
||||
unsigned char i, j;
|
||||
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
}
|
||||
|
||||
/* only the outer loop's variable is used inside, inner can be optimized into a repeat-loop */
|
||||
void for2(void)
|
||||
{
|
||||
unsigned char i, j;
|
||||
unsigned char i, j;
|
||||
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
}
|
||||
|
||||
/* only the inner loop's variable is used inside */
|
||||
void for3(void)
|
||||
{
|
||||
unsigned char i, j;
|
||||
unsigned char i, j;
|
||||
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
}
|
||||
|
||||
/* neither loop variable used inside the loops */
|
||||
void for4(void)
|
||||
{
|
||||
unsigned char i, j;
|
||||
unsigned char i, j;
|
||||
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(uchar0);
|
||||
dput(uchar1);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 0; j < 4; j++) {
|
||||
uchar1++;
|
||||
dput(uchar0);
|
||||
dput(uchar1);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 12)
|
||||
failures++;
|
||||
}
|
||||
|
||||
/* like for1 but different condition in inner loop */
|
||||
void for5(void)
|
||||
{
|
||||
unsigned char i, j;
|
||||
unsigned char i, j;
|
||||
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 10; j >= 5; j--) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 18)
|
||||
failures++;
|
||||
uchar0 = 0;
|
||||
uchar1 = 0;
|
||||
for(i = 0; i < 3; i++) {
|
||||
uchar0++;
|
||||
for(j = 10; j >= 5; j--) {
|
||||
uchar1++;
|
||||
dput(i);
|
||||
dput(j);
|
||||
}
|
||||
}
|
||||
if(uchar0 != 3)
|
||||
failures++;
|
||||
if(uchar1 != 18)
|
||||
failures++;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
|
||||
@@ -10,14 +10,14 @@ static unsigned char val, array[2];
|
||||
|
||||
int main() {
|
||||
|
||||
val = 0;
|
||||
array[0] = array[1] = 10;
|
||||
val = 0;
|
||||
array[0] = array[1] = 10;
|
||||
|
||||
array[val++] = 2;
|
||||
array[val++] = 2;
|
||||
--val;
|
||||
array[val--] = 0;
|
||||
array[val--] = 0;
|
||||
array[val++] = 2;
|
||||
array[val++] = 2;
|
||||
--val;
|
||||
array[val--] = 0;
|
||||
array[val--] = 0;
|
||||
|
||||
return (array[0] == array[1] && array[0] == 0 && val == 0xff) ? 0 : 1;
|
||||
return (array[0] == array[1] && array[0] == 0 && val == 0xff) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -50,33 +50,33 @@ void done()
|
||||
|
||||
void call0(void)
|
||||
{
|
||||
uchar0++;
|
||||
uchar0++;
|
||||
}
|
||||
|
||||
void call1(void)
|
||||
{
|
||||
uchar1++;
|
||||
uchar1++;
|
||||
}
|
||||
|
||||
unsigned char call2(void)
|
||||
{
|
||||
return uchar0 + 9;
|
||||
return uchar0 + 9;
|
||||
}
|
||||
|
||||
void docall0(void)
|
||||
{
|
||||
pfunc = call0;
|
||||
(pfunc)();
|
||||
if(uchar0 != 1)
|
||||
failures++;
|
||||
pfunc = call0;
|
||||
(pfunc)();
|
||||
if(uchar0 != 1)
|
||||
failures++;
|
||||
}
|
||||
|
||||
void docall1()
|
||||
{
|
||||
unsigned char i;
|
||||
for(i = 0; i < 3; i++) {
|
||||
(*p1func)();
|
||||
}
|
||||
unsigned char i;
|
||||
for(i = 0; i < 3; i++) {
|
||||
(*p1func)();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NO_IMPLICIT_FUNCPTR_CONV
|
||||
@@ -85,53 +85,53 @@ void docall2( void(*pf)(void) )
|
||||
void docall2( void(*pf)() )
|
||||
#endif
|
||||
{
|
||||
unsigned char i;
|
||||
for(i = 0; i < 2; i++) {
|
||||
pf();
|
||||
}
|
||||
unsigned char i;
|
||||
for(i = 0; i < 2; i++) {
|
||||
pf();
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
docall0();
|
||||
|
||||
p1func = call1;
|
||||
docall1();
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 1)
|
||||
failures++;
|
||||
p1func = call1;
|
||||
docall1();
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 1)
|
||||
failures++;
|
||||
|
||||
p1func = call0;
|
||||
docall1();
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 4)
|
||||
failures++;
|
||||
p1func = call0;
|
||||
docall1();
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 4)
|
||||
failures++;
|
||||
|
||||
docall2(call0);
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 6)
|
||||
failures++;
|
||||
docall2(call0);
|
||||
if(uchar1 != 3)
|
||||
failures++;
|
||||
if(uchar0 != 6)
|
||||
failures++;
|
||||
|
||||
docall2(call1);
|
||||
if(uchar1 != 5)
|
||||
failures++;
|
||||
if(uchar0 != 6)
|
||||
failures++;
|
||||
docall2(call1);
|
||||
if(uchar1 != 5)
|
||||
failures++;
|
||||
if(uchar0 != 6)
|
||||
failures++;
|
||||
|
||||
pcfunc = call2;
|
||||
uchar2 = (*pcfunc)();
|
||||
if(uchar2 != 15)
|
||||
failures++;
|
||||
pcfunc = call2;
|
||||
uchar2 = (*pcfunc)();
|
||||
if(uchar2 != 15)
|
||||
failures++;
|
||||
|
||||
uchar2 += (pcfunc)();
|
||||
uchar2 += pcfunc();
|
||||
uchar2 += (pcfunc)();
|
||||
uchar2 += pcfunc();
|
||||
|
||||
success = failures;
|
||||
done();
|
||||
printf("failures: %d\n",failures);
|
||||
success = failures;
|
||||
done();
|
||||
printf("failures: %d\n",failures);
|
||||
|
||||
return failures;
|
||||
return failures;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
static unsigned char flag;
|
||||
|
||||
static void trampoline_set() {
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
asm("jsr callptr4");
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
asm("jsr callptr4");
|
||||
}
|
||||
|
||||
#pragma wrapped-call(push, trampoline_set, 4)
|
||||
@@ -21,12 +21,12 @@ long adder(long in);
|
||||
|
||||
long adder(long in) {
|
||||
|
||||
return in + 7;
|
||||
return in + 7;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
flag = 0;
|
||||
flag = 0;
|
||||
|
||||
return adder(70436) == 70436 + 7 && flag == 4 ? 0 : 1;
|
||||
return adder(70436) == 70436 + 7 && flag == 4 ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
static unsigned char flag;
|
||||
|
||||
static void trampoline_set() {
|
||||
// The Y register is used for variadics - save and restore
|
||||
asm("sty tmp3");
|
||||
// The Y register is used for variadics - save and restore
|
||||
asm("sty tmp3");
|
||||
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
|
||||
asm("ldy tmp3");
|
||||
asm("jsr callptr4");
|
||||
asm("ldy tmp3");
|
||||
asm("jsr callptr4");
|
||||
}
|
||||
|
||||
#pragma wrapped-call(push, trampoline_set, 4)
|
||||
@@ -26,23 +26,23 @@ unsigned adder(unsigned char num, ...);
|
||||
|
||||
unsigned adder(unsigned char num, ...) {
|
||||
|
||||
unsigned char i;
|
||||
unsigned sum = 0;
|
||||
va_list ap;
|
||||
va_start(ap, num);
|
||||
unsigned char i;
|
||||
unsigned sum = 0;
|
||||
va_list ap;
|
||||
va_start(ap, num);
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
sum += va_arg(ap, unsigned);
|
||||
}
|
||||
for (i = 0; i < num; i++) {
|
||||
sum += va_arg(ap, unsigned);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
va_end(ap);
|
||||
|
||||
return sum;
|
||||
return sum;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
flag = 0;
|
||||
flag = 0;
|
||||
|
||||
return adder(3, 0, 5, 500) == 505 && flag == 4 ? 0 : 1;
|
||||
return adder(3, 0, 5, 500) == 505 && flag == 4 ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
static unsigned char flag;
|
||||
|
||||
static void trampoline_set() {
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
asm("jsr callptr4");
|
||||
asm("ldy tmp4");
|
||||
asm("sty %v", flag);
|
||||
asm("jsr callptr4");
|
||||
}
|
||||
|
||||
void trampoline_inc() {
|
||||
asm("inc %v", flag);
|
||||
asm("jsr callptr4");
|
||||
asm("inc %v", flag);
|
||||
asm("jsr callptr4");
|
||||
}
|
||||
|
||||
void func3() {
|
||||
@@ -25,7 +25,7 @@ void func3() {
|
||||
#pragma wrapped-call(push, trampoline_inc, 0)
|
||||
|
||||
void func2() {
|
||||
func3();
|
||||
func3();
|
||||
}
|
||||
|
||||
#pragma wrapped-call(push, trampoline_set, 4)
|
||||
@@ -36,14 +36,14 @@ void func1(void);
|
||||
#pragma wrapped-call(pop)
|
||||
|
||||
void func1() {
|
||||
func2();
|
||||
func2();
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
flag = 0;
|
||||
flag = 0;
|
||||
|
||||
func1();
|
||||
func1();
|
||||
|
||||
return flag == 5 ? 0 : 1;
|
||||
return flag == 5 ? 0 : 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user