Skip to content

Commit c58f120

Browse files
committed
CogVM source as per VMMaker.oscog-eem.3623
Fix slip in CogARMv8Compiler>>usesOutOfLineLiteral for LoadEffectiveAddressMwrR that generated unused out-of-line literals for negative offsets such as FoxMFReceiver Eliminate all excess spaces in the fix to ARMv8 disassembly (commit d974202).
1 parent d974202 commit c58f120

3 files changed

Lines changed: 13 additions & 37 deletions

File tree

processors/ARM/gdb-8.3.1/opcodes/aarch64-opc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3404,15 +3404,15 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
34043404
{
34053405
int imm32 = opnd->imm.value;
34063406
#if COG
3407-
snprintf (buf, size, "#0x%-8x // #%d", imm32, imm32);
3407+
snprintf (buf, size, "#0x%x // #%d", imm32, imm32);
34083408
#else
34093409
snprintf (buf, size, "#0x%-20x\t// #%d", imm32, imm32);
34103410
#endif
34113411
}
34123412
break;
34133413
case 8: /* e.g. MOV Xd, #<imm64>. */
34143414
#if COG
3415-
snprintf (buf, size, "#0x%-16" PRIx64 " // #%" PRIi64,
3415+
snprintf (buf, size, "#0x%" PRIx64 " // #%" PRIi64,
34163416
opnd->imm.value, opnd->imm.value);
34173417
#else
34183418
snprintf (buf, size, "#0x%-20" PRIx64 "\t// #%" PRIi64,

src/spur64.cog/cogitARMv8.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419
3-
(Compiler-ct.519)
2+
CCodeGenerator VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001
3+
(* Compiler-ct.519)
44
from
5-
StackToRegisterMappingCogit VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419
5+
StackToRegisterMappingCogit VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001
66
*/
7-
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419 " __DATE__ ;
7+
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001 " __DATE__ ;
88
char *__cogitBuildInfo = __buildInfo;
99

1010

@@ -7686,6 +7686,7 @@ usesOutOfLineLiteral(AbstractInstruction *self_in_CogARMv8Compiler)
76867686
case AddCqRR:
76877687
case SubCqR:
76887688
case CmpCqR:
7689+
case LoadEffectiveAddressMwrR:
76897690
immediate = ((sqLong) (((self_in_CogARMv8Compiler->operands))[0]));
76907691

76917692
/* begin isPossiblyShiftableNegatableImm12:ifTrue:ifFalse: */
@@ -7698,19 +7699,6 @@ usesOutOfLineLiteral(AbstractInstruction *self_in_CogARMv8Compiler)
76987699
}
76997700
return 1;
77007701

7701-
case LoadEffectiveAddressMwrR:
7702-
immediate = ((sqLong) (((self_in_CogARMv8Compiler->operands))[0]));
7703-
7704-
/* begin isPossiblyShiftableImm12:ifTrue:ifFalse: */
7705-
if (((immediate >= 0) && (immediate <= (0xFFF)))) {
7706-
return 0;
7707-
}
7708-
if (((!(immediate & (0xFFF))))
7709-
&& (((((immediate) >> 12) >= 0) && (((immediate) >> 12) <= (0xFFF))))) {
7710-
return 0;
7711-
}
7712-
return 1;
7713-
77147702
case AndCqR:
77157703
case AndCqRR:
77167704
case OrCqRR:

src/spur64.sista/cogitARMv8.c

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419
3-
(Compiler-ct.519)
2+
CCodeGenerator VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001
3+
(* Compiler-ct.519)
44
from
5-
SistaCogit VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419
5+
SistaCogit VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001
66
*/
7-
static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.3621 uuid: ca9e3bc9-55f3-4dbe-906b-b55feb2d3419 " __DATE__ ;
7+
static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.3623 uuid: c9a77704-a949-4a44-a1e8-1b40ae8c6001 " __DATE__ ;
88
char *__cogitBuildInfo = __buildInfo;
99

1010

@@ -7541,7 +7541,7 @@ rewriteImm19JumpBeforetarget(AbstractInstruction *self_in_CogARMv8Compiler, sqIn
75417541
static NoDbgRegParms sqInt
75427542
rewriteImm26JumpBeforetarget(AbstractInstruction *self_in_CogARMv8Compiler, sqInt followingAddress, sqInt targetAddress)
75437543
{
7544-
unsigned int instrOpcode;
7544+
sqInt instrOpcode;
75457545
sqInt mcpc;
75467546
sqInt offset;
75477547

@@ -7803,6 +7803,7 @@ usesOutOfLineLiteral(AbstractInstruction *self_in_CogARMv8Compiler)
78037803
case AddCqRR:
78047804
case SubCqR:
78057805
case CmpCqR:
7806+
case LoadEffectiveAddressMwrR:
78067807
immediate = ((sqLong) (((self_in_CogARMv8Compiler->operands))[0]));
78077808

78087809
/* begin isPossiblyShiftableNegatableImm12:ifTrue:ifFalse: */
@@ -7815,19 +7816,6 @@ usesOutOfLineLiteral(AbstractInstruction *self_in_CogARMv8Compiler)
78157816
}
78167817
return 1;
78177818

7818-
case LoadEffectiveAddressMwrR:
7819-
immediate = ((sqLong) (((self_in_CogARMv8Compiler->operands))[0]));
7820-
7821-
/* begin isPossiblyShiftableImm12:ifTrue:ifFalse: */
7822-
if (((immediate >= 0) && (immediate <= (0xFFF)))) {
7823-
return 0;
7824-
}
7825-
if (((!(immediate & (0xFFF))))
7826-
&& (((((immediate) >> 12) >= 0) && (((immediate) >> 12) <= (0xFFF))))) {
7827-
return 0;
7828-
}
7829-
return 1;
7830-
78317819
case AndCqR:
78327820
case AndCqRR:
78337821
case OrCqRR:

0 commit comments

Comments
 (0)