[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/24353] New: -Os doesn't work correcly
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gas/24353] New: -Os doesn't work correcly |
Date: |
Sat, 16 Mar 2019 23:33:41 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24353
Bug ID: 24353
Summary: -Os doesn't work correcly
Product: binutils
Version: 2.33 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: i386
The assembler manual has
'-O0 | -O | -O1 | -O2 | -Os'
Optimize instruction encoding with smaller instruction size. '-O'
and '-O1' encode 64-bit register load instructions with 64-bit
immediate as 32-bit register load instructions with 31-bit or
32-bits immediates and encode 64-bit register clearing instructions
with 32-bit register clearing instructions. '-O2' includes '-O1'
optimization plus encodes 256-bit and 512-bit vector register
clearing instructions with 128-bit vector register clearing
instructions. '-Os' includes '-O2' optimization plus encodes
16-bit, 32-bit and 64-bit register tests with immediate as 8-bit
register test with immediate. '-O0' turns off this optimization.
But we got
address@hidden testsuite]$ cat /tmp/x.s
vandnpd %zmm1, %zmm1, %zmm5
address@hidden testsuite]$ as -O2 -o x.o /tmp/x.s
address@hidden testsuite]$ objdump -dw x.o
x.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: c5 f1 55 e9 vandnpd %xmm1,%xmm1,%xmm5
address@hidden testsuite]$ as -Os -o x.o /tmp/x.s
address@hidden testsuite]$ objdump -dw x.o
x.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: 62 f1 f5 48 55 e9 vandnpd %zmm1,%zmm1,%zmm5
address@hidden testsuite]$
-Os didn't enable -O2.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/24353] New: -Os doesn't work correcly,
hjl.tools at gmail dot com <=