Hello,

Could you please let me know the status of this patch?

Thank you,

Darius Galis

On 26-Aug-20 1:24 PM, Darius Galis wrote:
Hello,
Thank you for adjusting the patch.
I don't have commit privileges, so if you could please commit it, that would be 
great.
Best regards,
Darius Galis
On 25-Aug-20 10:48 PM, Jeff Law wrote:
On Tue, 2020-08-18 at 16:05 +0300, Darius Galis wrote:
Hello,

The following patch is adding the PC control register.
It also updates the __builtin_rx_mvfc() function, since
according to the documentation, the PC register cannot be specified
as dest.

The regression was tested with the following command:

make -k check-gcc RUNTESTFLAGS=--target_board=rx-sim

There were no additionals failures.

Please let me know if this is OK, Thank you!
Darius Galis

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b834a2c..3436c25 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2020-08-17  Darius Galis<darius.ga...@cyberthorstudios.com>
+
+       * config/rx/rx.md (CTRLREG_PC): Add.
+       * config/rx/rx.c (CTRLREG_PC): Add
+       (rx_expand_builtin_mvtc): Add warning: PC register cannot
+       be used as dest.
+
   2020-08-03  Jonathan Wakely<jwak...@redhat.com>
* doc/cpp.texi (Variadic Macros): Use the exact ... token in
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 151ad39..1cc88d9 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -639,6 +639,7 @@ rx_print_operand (FILE * file, rtx op, int letter)
         switch (INTVAL (op))
        {
        case CTRLREG_PSW:   fprintf (file, "psw"); break;
+       case CTRLREG_PC:    fprintf (file, "pc"); break;
        case CTRLREG_USP:   fprintf (file, "usp"); break;
        case CTRLREG_FPSW:  fprintf (file, "fpsw"); break;
        case CTRLREG_BPSW:  fprintf (file, "bpsw"); break;
@@ -2474,6 +2475,14 @@ rx_expand_builtin_mvtc (tree exp)
     if (! REG_P (arg2))
       arg2 = force_reg (SImode, arg2);
+ if (INTVAL(arg1) == 1/*PC*/)
We generally avoid comments on the same line as code.  And there should be a
space before the open paren of a function or macro argument.  So:

/* PC */
if (INTVAL (arg1) == 1)

With that change, this is OK to commit.  I can't recall if you have commit privs
or not...  If not, I can commit for you.


Thanks,
Jeff

--
Ing. Darius GaliČ™
Software Engineer - CyberTHOR Studios Ltd.

--
Ing. Darius GaliČ™
Software Engineer - CyberTHOR Studios Ltd.

Reply via email to