diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-07 13:29:23 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-07 13:31:15 -0600 |
| commit | 0907d94bf1e71c5ec697db53933abc462e703c35 (patch) | |
| tree | 5635979a29fa8c0428a70937fe751bad47434dc7 /tb/sim/mult.c | |
| parent | aaf02562e4d49fc93df1f619e3fbd6c85c0e7951 (diff) | |
Improve mult sim
Diffstat (limited to 'tb/sim/mult.c')
| -rw-r--r-- | tb/sim/mult.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tb/sim/mult.c b/tb/sim/mult.c index 531a824..67158f0 100644 --- a/tb/sim/mult.c +++ b/tb/sim/mult.c @@ -1,4 +1,10 @@ -int reset(int a, int b, int c) +long long __attribute__((noinline)) mla(long long a, long long b, long long c) { return a * b + c; } + +long long reset(int a, int b, int c) +{ + long long la = a, lb = b; + return mla(la * la, la + 2 * lb, c); +} |
