qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] target-alpha: An approach to fp insn qualifiers


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

One of the other folks here (I'm sorry, I've forgotten who as I misplaced the mail) passed me a preliminary patch to tackle the missing fp rounding mode support. That patch added helpers to change the rounding mode, and injected them before and after every fp insn that forced a rounding mode.

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~

Attachment: commit-fpu-1
Description: Text document

Attachment: commit-fpu-2
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]