Skip to content

Commit

Permalink
- Fixed Floating Point Release Build Bug (#1225)
Browse files Browse the repository at this point in the history
* - Merged

* - Merged
  • Loading branch information
tgiphil committed May 3, 2024
1 parent cf60b2e commit 0162d04
Show file tree
Hide file tree
Showing 178 changed files with 1,142 additions and 695 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[build-status-image]: https://github.com/mosa/MOSA-Project/workflows/Builds/badge.svg?branch=master
[build-status]: https://github.com/mosa/MOSA-Project/actions
[test-status-image]: https://github.com/mosa/MOSA-Project/workflows/Unit%20Tests/badge.svg
[test-status-image]: https://github.com/mosa/MOSA-Project/workflows/Builds/badge.svg
[test-status]: https://github.com/mosa/MOSA-Project/actions
[pull-requests-image]: http://www.issuestats.com/github/mosa/mosa-project/badge/pr
[pull-requests]: http://www.issuestats.com/github/mosa/mosa-project
Expand Down
2 changes: 1 addition & 1 deletion Source/Data/IR-Instructions.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"Name": "ExceptionEnd",
"FamilyName": "IR",
"ResultCount": 0,
"OperandCount": 1,
"OperandCount": 0,
"IgnoreDuringCodeGeneration": "true"
},
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Data/IR-Optimizations-Simplification.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"Name": "MoveObject",
"SubName": "Coalescing",
"Expression": "IR.MoveObject (IR.MoveObject a)",
"Filter": "",
"Filter": "!IsCPURegister(a)",
"Result": "(IR.MoveObject a)",
"Priority": "25"
},
Expand All @@ -55,7 +55,7 @@
"Name": "MoveManagedPointer",
"SubName": "Coalescing",
"Expression": "IR.MoveManagedPointer (IR.MoveManagedPointer a)",
"Filter": "",
"Filter": "!IsCPURegister(a)",
"Result": "(IR.MoveManagedPointer a)",
"Priority": "25"
},
Expand Down
16 changes: 8 additions & 8 deletions Source/Data/X64-Optimizations-ConstantMove.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Name": "Add##",
"SubName": "",
"Expression": "X64.Add## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Add## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -27,7 +27,7 @@
"Name": "Sub##",
"SubName": "",
"Expression": "X64.Sub## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Sub## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -37,7 +37,7 @@
"Name": "And##",
"SubName": "",
"Expression": "X64.And## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.And## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -47,7 +47,7 @@
"Name": "Or##",
"SubName": "",
"Expression": "X64.Or## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Or## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -57,7 +57,7 @@
"Name": "Xor##",
"SubName": "",
"Expression": "X64.Xor## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Xor## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -67,7 +67,7 @@
"Name": "Sar##",
"SubName": "",
"Expression": "X64.Sar## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Sar## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -77,7 +77,7 @@
"Name": "Shl##",
"SubName": "",
"Expression": "X64.Shl## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Shl## a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -87,7 +87,7 @@
"Name": "Shr##",
"SubName": "",
"Expression": "X64.Shr## a (X64.Mov## c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Shr## a c)",
"Variations": "No",
"Log": "No"
Expand Down
2 changes: 1 addition & 1 deletion Source/Data/X64-Optimizations-Lea.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"Name": "Mul##ToLea##",
"SubName": "By3Or5Or9",
"Expression": "X64.Mul## a b",
"Filter": "!IsResult2Used(@) && !IsZero(a) && Contains(b, 3, 5, 9) && !AreAnyStatusFlagsUsed(@)",
"Filter": "!IsResult2Used(@) && !IsZero(a) && Contains(b, 3, 5, 9) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Lea## a a [Sub##(To##(b),1)] [To##(0)])",
"Variations": "No",
"Log": "No"
Expand Down
36 changes: 18 additions & 18 deletions Source/Data/X64-Optimizations-Standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"Name": "Add##",
"SubName": "ByZero",
"Expression": "X64.Add## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Variations": "No"
},
Expand All @@ -35,7 +35,7 @@
"Name": "Sub##",
"SubName": "ByZero",
"Expression": "X64.Sub## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Variations": "Yes"
},
Expand All @@ -44,7 +44,7 @@
"Name": "IMul##",
"SubName": "ByZero",
"Expression": "X64.IMul## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Variations": "No",
"Log": "No"
Expand All @@ -54,7 +54,7 @@
"Name": "IMul##",
"SubName": "ByOne",
"Expression": "X64.IMul## a 1",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 1)",
"Variations": "No",
"Log": "No"
Expand All @@ -64,7 +64,7 @@
"Name": "And##",
"SubName": "ByFF",
"Expression": "X64.And## a 0xFF",
"Filter": "!IsCPURegister(a,%ESI) && !IsCPURegister(a,%EDI) && !AreAnyStatusFlagsUsed(@)",
"Filter": "!IsCPURegister(a,%ESI) && !IsCPURegister(a,%EDI) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Movzx8To## a)",
"Variations": "Yes",
"Log": "No",
Expand All @@ -75,7 +75,7 @@
"Name": "Add##By1Not##",
"SubName": "",
"Expression": "X64.Add## (X64.Not## x) 1",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@)",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@, $Window)",
"Result": "(X64.Neg## x)",
"Variations": "Yes"
},
Expand All @@ -84,7 +84,7 @@
"Name": "Inc##Not##",
"SubName": "",
"Expression": "X64.Inc## (X64.Not## x)",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@)",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@, $Window)",
"Result": "(X64.Neg## x)",
"Variations": "No"
},
Expand All @@ -93,7 +93,7 @@
"Name": "And##Add##",
"SubName": "ToBlsr##",
"Expression": "X64.And## x (X64.Add## x -1)",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@)",
"Filter": "IsVirtualRegister(x) && !IsCarryFlagUsed(@, $Window)",
"Result": "(X64.Blsr## x)",
"Variations": "Yes"
},
Expand All @@ -112,7 +112,7 @@
"Name": "And##",
"SubName": "ByZero",
"Expression": "X64.And## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Variations": "Yes",
"Log": "No"
Expand All @@ -122,7 +122,7 @@
"Name": "And##",
"SubName": "ByMax",
"Expression": "X64.And## a 0xFFFFFFFF",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## [To##(0xFFFFFFFF)])",
"Variations": "Yes",
"Log": "No"
Expand All @@ -132,7 +132,7 @@
"Name": "Sar##",
"SubName": "ZeroValue",
"Expression": "X64.Sar## 0 a",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Priority": "80"
},
Expand All @@ -141,7 +141,7 @@
"Name": "Sar##",
"SubName": "ByZero",
"Expression": "X64.Sar## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Priority": "80"
},
Expand All @@ -150,7 +150,7 @@
"Name": "Shl##",
"SubName": "ZeroValue",
"Expression": "X64.Shl## 0 a",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Priority": "80"
},
Expand All @@ -159,7 +159,7 @@
"Name": "Shl##",
"SubName": "ByZero",
"Expression": "X64.Shl## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Priority": "80"
},
Expand All @@ -168,7 +168,7 @@
"Name": "Shr##",
"SubName": "ZeroValue",
"Expression": "X64.Shr## 0 a",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Priority": "80"
},
Expand All @@ -177,7 +177,7 @@
"Name": "Shr##",
"SubName": "ByZero",
"Expression": "X64.Shr## a 0",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Priority": "80"
},
Expand All @@ -186,7 +186,7 @@
"Name": "IMul##Mov##",
"SubName": "ByZero",
"Expression": "X64.IMul## a (X64.Mov## 0)",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## 0)",
"Variations": "No",
"Log": "No"
Expand All @@ -196,7 +196,7 @@
"Name": "IMul##Mov##",
"SubName": "ByOne",
"Expression": "X64.IMul## a (X64.Mov## 1)",
"Filter": "!AreAnyStatusFlagsUsed(@)",
"Filter": "!AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X64.Mov## a)",
"Variations": "No",
"Log": "No"
Expand Down
16 changes: 8 additions & 8 deletions Source/Data/X86-Optimizations-ConstantMove.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"Name": "Add32",
"SubName": "",
"Expression": "X86.Add32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Add32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -23,7 +23,7 @@
"Name": "Sub32",
"SubName": "",
"Expression": "X86.Sub32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Sub32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -33,7 +33,7 @@
"Name": "And32",
"SubName": "",
"Expression": "X86.And32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.And32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -43,7 +43,7 @@
"Name": "Or32",
"SubName": "",
"Expression": "X86.Or32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Or32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -53,7 +53,7 @@
"Name": "Xor32",
"SubName": "",
"Expression": "X86.Xor32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Xor32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -63,7 +63,7 @@
"Name": "Sar32",
"SubName": "",
"Expression": "X86.Sar32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Sar32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -73,7 +73,7 @@
"Name": "Shl32",
"SubName": "",
"Expression": "X86.Shl32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Shl32 a c)",
"Variations": "No",
"Log": "No"
Expand All @@ -83,7 +83,7 @@
"Name": "Shr32",
"SubName": "",
"Expression": "X86.Shr32 a (X86.Mov32 c)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@)",
"Filter": "IsConstant(c) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Shr32 a c)",
"Variations": "No",
"Log": "No"
Expand Down
2 changes: 1 addition & 1 deletion Source/Data/X86-Optimizations-Lea.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"Name": "Mul32ToLea32",
"SubName": "By3Or5Or9",
"Expression": "X86.Mul32 a b",
"Filter": "!IsResult2Used(@) && !IsZero(a) && Contains(b, 3, 5, 9) && !AreAnyStatusFlagsUsed(@)",
"Filter": "!IsResult2Used(@) && !IsZero(a) && Contains(b, 3, 5, 9) && !AreAnyStatusFlagsUsed(@, $Window)",
"Result": "(X86.Lea32 a a [Sub32(To32(b),1)] [To32(0)])",
"Variations": "No",
"Log": "No"
Expand Down

0 comments on commit 0162d04

Please sign in to comment.