mirror of
https://github.com/ziglang/zig.git
synced 2026-02-18 07:18:38 +00:00
x86_64: optimize code size for double neg/abs
This commit is contained in:
parent
36a39267b8
commit
a5e50891cb
@ -4229,16 +4229,12 @@ fn airFloatSign(self: *Self, inst: Air.Inst.Index) !void {
|
||||
|
||||
const tag = self.air.instructions.items(.tag)[inst];
|
||||
try self.genBinOpMir(switch (ty_bits) {
|
||||
32 => switch (tag) {
|
||||
// No point using an extra prefix byte for *pd which performs the same operation.
|
||||
32, 64 => switch (tag) {
|
||||
.neg => .xorps,
|
||||
.fabs => .andnps,
|
||||
else => unreachable,
|
||||
},
|
||||
64 => switch (tag) {
|
||||
.neg => .xorpd,
|
||||
.fabs => .andnpd,
|
||||
else => unreachable,
|
||||
},
|
||||
else => return self.fail("TODO implement airFloatSign for {}", .{
|
||||
ty.fmt(self.bin_file.options.module.?),
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user