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

VMACF: missing test for accumulator 32-bit overflow #13

Open
rasky opened this issue Jul 9, 2018 · 0 comments
Open

VMACF: missing test for accumulator 32-bit overflow #13

rasky opened this issue Jul 9, 2018 · 0 comments

Comments

@rasky
Copy link
Contributor

rasky commented Jul 9, 2018

The current testcases for VMACF do not show what happens if the accumulator hits the 32-bit signed overflow. For instance, see the following sequence where I show a single 16-bit element of a full register:

0000: VMULF $5656, $7654 => ACC: $0000_4FD0_7070, RESULT: $4FD0
0004: VMACF $5656, $7654 => ACC: $0000_7FFF_FFFF, RESULT: $7FFF   (???)

This example assumes that the 32-bit accumulator goes into signed saturation (0x4FD07070 * 2 => overflows), but there is not testcase to show this behavior.

Instead, there is a test for VMACU that shows that saturation does not happen (but it doesn't show what happens when the 32-bit unsigned result overflows... probably there is 1-bit carry into the high part of the accumulator, but no test is shown).

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