The FreeType Project - Bugs: bug #23556, FT_MulFix clobbers EDX register...
You are not allowed to post comments on this tracker with your current authentication level.
bug #23556: FT_MulFix clobbers EDX register without telling gcc
Submitter: | None | ||
Submitted: | Thu 12 Jun 2008 07:31:06 PM UTC | ||
Severity: | 3 - Normal | Item Group: | None |
Status: | Fixed | Privacy: | Public |
Assigned to: | wl | Open/Closed: | Closed |
Planned Release: | 2.3.7 |
Sun 15 Jun 2008 11:09:26 AM UTC, comment #3: |
Werner LEMBERG <wl> |
Sun 15 Jun 2008 01:16:21 AM UTC, comment #2: The patch gave me the compiler error "error: can't find a register in class `DREG' while reloading `asm'". gcc does not seem to allow putting the same register as both an input and a clobber. I think it needs to be an output operand.
|
Anonymous |
Sat 14 Jun 2008 06:37:28 AM UTC, comment #1: Does the patch below fix the issue?
|
Werner LEMBERG <wl> |
Thu 12 Jun 2008 07:31:06 PM UTC, original submission:
The assembly code for FT_MulFix does not tell gcc that it changes the EDX register. If function inlining is enabled, this causes a problem: when FT_MulFix is called inline from ft_recompute_scaled_metrics, gcc incorrectly thinks that EDX still holds metrics->y_scale, and the descender size is calculated wrong (usually, as 0). |
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 7 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-06-15 | wl | Status | Need Info | Fixed | |
Open/Closed | Open | Closed | |||
Planned Release | None | 2.3.7 | |||
2008-06-15 | wl | Attached File | - | Added mulfix.c, #15846 | |
Attached File | - | Added mulfix.s, #15847 | |||
2008-06-14 | wl | Status | None | Need Info | |
Assigned to | None | wl |
Powered by Savane 3.13-bb6a.
Corresponding source code
Thanks a lot for the analysis and the patch. I've applied it to the CVS.
Interestingly, with gcc 4.1.2 (and -O3), I don't see problems with the EAX register (see attached files); the attached program gives
bad: 31 0
bad: 31 46
good: 31 46
good: 31 46
(file #15846, file #15847)