Skip to content

Commit

Permalink
Adding change example
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoch committed Sep 21, 2021
1 parent e47b365 commit f5d084a
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,34 @@ different binaries (I believe it should not if the detail truly does not matter)
- [llvm-project](llvm-project) was cloned around 7am September 16
- [llvm-project-fix](llvm-project-fix) is an identical copy of that, but with a fix for the bug above.

For both, we will build side by side containers.
For both, we will build side by side containers. The bug is in [this file](https://github.com/buildsi/llvm-bug/blob/main/llvm-project-fix/clang/lib/CodeGen/TargetInfo.cpp) and here is the diff between the "fix" (what I wrote) and the current implementation (at the time I cloned it). Here is the original (postMerge)

```cpp
if (Hi == Memory)
Lo = Memory;
if (Hi == X87Up && Lo != X87 && honorsRevision0_98())
Lo = Memory;
if (AggregateSize > 128 && (Lo != SSE || Hi != SSEUp))
Lo = Memory;
if (Hi == SSEUp && Lo != SSE)
Hi = SSE;
```
And what I changed it to, to reflect the ABI document (because they said if one OR the other).

```cpp
if (Hi == Memory)
Lo = Memory;
if (Lo == Memory)
Hi = Memory;
if (Hi == X87Up && Lo != X87 && honorsRevision0_98())
Lo = Memory;
Hi = Memory;
if (AggregateSize > 128 && (Lo != SSE || Hi != SSEUp))
Lo = Memory;
Hi = Memory;
if (Hi == SSEUp && Lo != SSE)
Hi = SSE;
```

## Usage

Expand Down

0 comments on commit f5d084a

Please sign in to comment.