Skip to content

Commit e650a7f

Browse files
clazissartemiy-volkov
authored andcommitted
arc64: HACK: volatile pointers will use .di
1 parent e2409b2 commit e650a7f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

gcc/config/arc64/arc64.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,11 @@ arc64_print_operand (FILE *file, rtx x, int code)
10701070
return;
10711071
}
10721072

1073+
/* FIXME! consider volatile accesses as .di accesses, everything
1074+
under an option. */
1075+
if (MEM_VOLATILE_P (x) && TARGET_VOLATILE_DI)
1076+
fputs (".di", file);
1077+
10731078
switch (GET_CODE (XEXP (x, 0)))
10741079
{
10751080
case PRE_INC:
@@ -2875,6 +2880,10 @@ arc64_short_access_p (rtx op, machine_mode mode, bool load_p)
28752880
if (GET_CODE (op) != MEM)
28762881
return 0;
28772882

2883+
/* FIXME! remove it when "uncached" attribute is added. */
2884+
if (MEM_VOLATILE_P (op) && TARGET_VOLATILE_DI)
2885+
return false;
2886+
28782887
if (mode == VOIDmode)
28792888
mode = GET_MODE (op);
28802889

gcc/config/arc64/arc64.opt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ Target RejectNegative Joined
7171
munaligned-access
7272
Target Report Var(unaligned_access) Init(UNALIGNED_ACCESS_DEFAULT)
7373
Enable unaligned accesses to packed data.
74+
75+
mvolatile-di
76+
Target Mask(VOLATILE_DI)
77+
Enable uncached access for volatile memories.

0 commit comments

Comments
 (0)