This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix assembler arguments for -m16


On 06.11.16 21:38, Uros Bizjak wrote:
On Sun, Nov 6, 2016 at 5:48 PM, Gerald Pfeifer <gerald@pfeifer.com> wrote:
It appears this got stuck.

Uros, is this okay?  I can handle the commit if you approve.

Looks good to me, so OK if tested on non-glibc system.


Results w/o patch:
https://gcc.gnu.org/ml/gcc-testresults/2016-11/msg00627.html

Results with patch:
https://gcc.gnu.org/ml/gcc-testresults/2016-11/msg00672.html

Andreas

Thanks,
Uros.

Gerald

On Wed, 6 Jul 2016, Roger Pau Monne wrote:
At the moment the -m16 option only passes the "--32" parameter to the
assembler on glibc OSes, while on other OSes the assembler is called without
any specific flag. This is wrong and causes the assembler to fail. Fix it
by adding support for the -m16 option to x86-64.h.

2016-07-06  Roger Pau Monné  <roger.pau@citrix.com>

      * x86-64.h: append --32 to the assembler options when -m16 is used
      even on non-glibc OSes.

---
Cc: hjl@gcc.gnu.org
Cc: gerald@FreeBSD.org
---
This should be backported to all stable branches up to 4.9 (when -m16 was
introduced).

Please keep me on Cc since I'm not subscribed to the list, thanks.
---
 gcc/config/i386/x86-64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h
index b0bf835..9e6c6eb 100644
--- a/gcc/config/i386/x86-64.h
+++ b/gcc/config/i386/x86-64.h
@@ -49,7 +49,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define WCHAR_TYPE_SIZE 32

 #undef ASM_SPEC
-#define ASM_SPEC "%{m32:--32} %{m64:--64} %{mx32:--x32}"
+#define ASM_SPEC "%{m16|m32:--32} %{m64:--64} %{mx32:--x32}"

 #undef ASM_OUTPUT_ALIGNED_BSS
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]