|
From: | Richard Henderson |
Subject: | [Qemu-devel] target-alpha: An approach to fp insn qualifiers |
Date: | Mon, 14 Dec 2009 10:02:36 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 |
After some thought I decided not to pursue this method for the simple reason that TCG does not have native floating point code generation. Given that we have to call one helper routine to perform the operation, we might as well arrange for that same routine to handle the rounding mode manipulation.
Indeed, the patch below doesn't just pass the rounding mode to the helper, but all of the qualifier fields. Thus we can avoid a large explosion of helper routines for addt{,/u,/su,sui}{,/c,/m,/d}.
To complete the patch I should add some symbolic defines for /s, /u, etc to avoid magic constants cluttering the code. I should figure out what I should pass to helper_excp for each arithmetic exception. I should actually implement the arithmetic exceptions.
That said, these two patches are enough to pass the gcc testsuite with no regressions over native hardware.
Comments? r~
commit-fpu-1
Description: Text document
commit-fpu-2
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |