Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IALU2 mode setting causes longer latency than necessary #42

Open
MichaelBell opened this issue Mar 14, 2015 · 0 comments
Open

IALU2 mode setting causes longer latency than necessary #42

MichaelBell opened this issue Mar 14, 2015 · 0 comments

Comments

@MichaelBell
Copy link

When setting integer arithmetic mode, the CONFIG register is set to 0x00080000.

If instead it was set to 0x00080001 IALU2 operations would have 1 less cycle of latency with no downside (because integer arithmetic operations never require rounding).

I believe the only change required is the following diff, but I'm not familiar enough with either gcc or the epiphany code within gcc to be certain there aren't other places that need changing.

--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -2618,7 +2618,7 @@ emit_set_fp_mode (int entity, int mode, HARD_REG_SET regs_
     {
       gcc_assert (mode >= 0 && mode <= 2);
       if (mode == 1)
-       emit_move_insn (MACHINE_FUNCTION (cfun)->or_mask, GEN_INT(0x00080000));
+       emit_move_insn (MACHINE_FUNCTION (cfun)->or_mask, GEN_INT(0x00080001));
       return;
     }
   else if (entity == EPIPHANY_MSW_ENTITY_CONFIG)

Cheers,
Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant