More tests passed, bug fix for INS REG IMM...
This commit is contained in:
@ -130,16 +130,24 @@ static void build_regular (operation_index operation,
|
|||||||
(from == REG) && (upper ((form) source)));
|
(from == REG) && (upper ((form) source)));
|
||||||
|
|
||||||
// 40>front
|
// 40>front
|
||||||
place ((size == D8) && (to == REG) && (from == REG)
|
place ((size == D8) && (to == REG) && ((from == REG) || (from == IMM))
|
||||||
&& ((front (destination) && lower (source))
|
&& (((front (destination) && lower (source))
|
||||||
|| (lower (destination) && front (source))), (byte) 0X40);
|
|| (lower (destination) && front (source))) ||
|
||||||
|
((to == REG) && (from == IMM) && front (destination))),
|
||||||
|
(byte) 0X40);
|
||||||
|
|
||||||
build_constant (from == IMM, size);
|
build_constant ((from == IMM) && (to == REG) && (destination != 0), size);
|
||||||
|
|
||||||
place (1, (byte) (0X08 * (operation - REGULAR_BEGIN)
|
place ((from == IMM) && (to == REG) && (destination == 0),
|
||||||
|
(byte) (0X05
|
||||||
|
+ 0X08 * (operation & 0X07))
|
||||||
|
- 0X01 * (size == D8));
|
||||||
|
|
||||||
|
place ((from == IMM) && (to == REG) && (destination != 0),
|
||||||
|
(byte) (0X08 * (operation - REGULAR_BEGIN)
|
||||||
+ (destination & 0X07) * ((to == REG) && (from == IMM))
|
+ (destination & 0X07) * ((to == REG) && (from == IMM))
|
||||||
+ 0X01 * ((to == MEM) && (from == IMM) && (size == D8)) //
|
+ 0X01 * ((to == MEM) && (from == IMM) && (size == D8)) //
|
||||||
- 0X01 * ((to == REG) && (from == IMM)) //
|
- 0X01 * ((to == REG) && (from == IMM) && (size != D8)) //
|
||||||
+ 0X01 * (size != D8)
|
+ 0X01 * (size != D8)
|
||||||
+ 0X02 * ((to == REG) && (from == MEM))
|
+ 0X02 * ((to == REG) && (from == MEM))
|
||||||
+ 0X04 * ((to == MEM) && (from == IMM))
|
+ 0X04 * ((to == MEM) && (from == IMM))
|
||||||
@ -172,7 +180,7 @@ static void build_irregular (operation_index operation,
|
|||||||
// 40>front
|
// 40>front
|
||||||
place ((size == D8) && (to == REG) && front (destination), (byte) 0X40);
|
place ((size == D8) && (to == REG) && front (destination), (byte) 0X40);
|
||||||
|
|
||||||
place (1, (byte) (0XF8
|
place (1, (byte) (0XF7
|
||||||
+ 0X08 * ((operation == INC) || (operation == DEC))
|
+ 0X08 * ((operation == INC) || (operation == DEC))
|
||||||
- 0X01 * (size == D8)));
|
- 0X01 * (size == D8)));
|
||||||
|
|
||||||
|
@ -37,17 +37,7 @@ int main (void) {
|
|||||||
printf ("nop\n");
|
printf ("nop\n");
|
||||||
printf ("nop\n");
|
printf ("nop\n");
|
||||||
|
|
||||||
for (a = 0; a < (int) (sizeof (fa) / sizeof (* fa)); ++a) {
|
// INR REG REG
|
||||||
//~for (w = 0; w < 4; ++w) {
|
|
||||||
for (d = 0; d < 64; ++d) {
|
|
||||||
//~for (s = 0; s < 16; ++s) {
|
|
||||||
printf ("nop\n");
|
|
||||||
printf ("%s %s, %s\n", fa [a], fr [d], fi [d / 16]);
|
|
||||||
//~}
|
|
||||||
}
|
|
||||||
//~}
|
|
||||||
}
|
|
||||||
|
|
||||||
//~for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
//~for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
||||||
//~for (w = 0; w < 4; ++w) {
|
//~for (w = 0; w < 4; ++w) {
|
||||||
//~for (d = 0; d < 16; ++d) {
|
//~for (d = 0; d < 16; ++d) {
|
||||||
@ -57,6 +47,24 @@ int main (void) {
|
|||||||
//~}
|
//~}
|
||||||
//~}
|
//~}
|
||||||
|
|
||||||
|
// INR REG IMM
|
||||||
|
for (a = 0; a < (int) (sizeof (fa) / sizeof (* fa)); ++a) {
|
||||||
|
for (d = 0; d < 64; ++d) {
|
||||||
|
printf ("nop\n");
|
||||||
|
printf ("%s %s, %s\n", fa [a], fr [d], fi [d / 16]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// INI REG
|
||||||
|
for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
||||||
|
for (w = 0; w < 4; ++w) {
|
||||||
|
for (d = 0; d < 16; ++d) {
|
||||||
|
printf ("nop\n");
|
||||||
|
printf ("%s %s\n", faa [a], fr [d + 16 * w]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf ("nop\n");
|
printf ("nop\n");
|
||||||
printf ("nop\n");
|
printf ("nop\n");
|
||||||
printf ("nop\n");
|
printf ("nop\n");
|
||||||
|
@ -27,30 +27,18 @@ int main (void) {
|
|||||||
for (a = 0; a < (int) (sizeof (fa) / sizeof (* fa)); ++a) {
|
for (a = 0; a < (int) (sizeof (fa) / sizeof (* fa)); ++a) {
|
||||||
for (w = 0; w < 4; ++w) {
|
for (w = 0; w < 4; ++w) {
|
||||||
for (d = 0; d < 16; ++d) {
|
for (d = 0; d < 16; ++d) {
|
||||||
//~for (s = 0; s < 16; ++s) {
|
|
||||||
printf ("NOP, %s, %s, %s, %s,\n", fa [a], fw [w], fr [d], fi [w]);
|
printf ("NOP, %s, %s, %s, %s,\n", fa [a], fw [w], fr [d], fi [w]);
|
||||||
//~}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//~for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
||||||
//~for (w = 0; w < 4; ++w) {
|
for (w = 0; w < 4; ++w) {
|
||||||
//~for (d = 0; d < 16; ++d) {
|
for (d = 0; d < 16; ++d) {
|
||||||
//~for (s = 0; s < 16; ++s) {
|
printf ("NOP, %s, %s, %s,\n", faa [a], fw [w], fr [d]);
|
||||||
//~printf ("NOP, %s, %s, %s, %s,\n", faa [a], fw [w], fr [d], fi [s]);
|
}
|
||||||
//~}
|
}
|
||||||
//~}
|
}
|
||||||
//~}
|
|
||||||
//~}
|
|
||||||
|
|
||||||
//~for (a = 0; a < (int) (sizeof (faa) / sizeof (* faa)); ++a) {
|
|
||||||
//~for (w = 0; w < 4; ++w) {
|
|
||||||
//~for (d = 0; d < 16; ++d) {
|
|
||||||
//~printf ("NOP, %s, %s, %s,\n", faa [a], fw [w], fr [d]);
|
|
||||||
//~}
|
|
||||||
//~}
|
|
||||||
//~}
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user