x86: Set optimize to INT_MAX for -Os
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 16 Mar 2019 23:39:18 +0000 (07:39 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 16 Mar 2019 23:49:06 +0000 (07:49 +0800)
commit41fd2579f2ac6a5fca262317b0e52eea07fa7438
tree14e5d4037a761c636b0ed0c61a33626e768c59bc
parentdd22218cf26fa5d8beade7266de391a28e63527b
x86: Set optimize to INT_MAX for -Os

Set optimize to INT_MAX, instead of -1, for -Os so that -Os will include
-O2 optimization.

PR gas/24353
* config/tc-i386.c (md_parse_option): Set optimize to INT_MAX
for -Os.
* testsuite/gas/i386/optimize-2.s: Add a test.
* testsuite/gas/i386/x86-64-optimize-3.s: Likewise.
* testsuite/gas/i386/optimize-2.d: Updated.
* testsuite/gas/i386/x86-64-optimize-3.d: Likewise.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/optimize-2.d
gas/testsuite/gas/i386/optimize-2.s
gas/testsuite/gas/i386/x86-64-optimize-3.d
gas/testsuite/gas/i386/x86-64-optimize-3.s