[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/19910] New: Unsigned arithmetic and %hi()/%low() operators
From: |
orlandoarias at gmail dot com |
Subject: |
[Bug gas/19910] New: Unsigned arithmetic and %hi()/%low() operators |
Date: |
Tue, 05 Apr 2016 14:13:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19910
Bug ID: 19910
Summary: Unsigned arithmetic and %hi()/%low() operators
Product: binutils
Version: 2.26
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: orlandoarias at gmail dot com
Target Milestone: ---
Working with he sparc-leon3-linux target in gas versions 2.26.20160125
and 2.23, the following behaviour is observed:
sethi %hi(((((0x40000000U + 0x40000000U) - 160)-(8192U-160))-32U)), %fp
or %g0, %lo(((((0x40000000U +0x40000000U) - 160)-(8192U-160))-32U)), %fp
These statements fail to assemble with the error:
Error: missing ')'
However, the following assembles with no issues:
sethi %hi(((((0x40000000 + 0x40000000) - 160)-(8192-160))-32)), %fp
or %g0, %lo(((((0x40000000 +0x40000000) - 160)-(8192-160))-32)), %fp
The issue can be reduced to the following lines:
or %g0, %lo(0x40000000U +0x40000000U), %g1
or %g0, %lo((0x40000000U +0x40000000U)), %g1
The first line assembles properly, whereas the second line fails to assemble.
It looks like this is a bug with the parser. I have only tested this with the
sparc-leon3-linux target, but other targets may also be affected with the
issue. Thank you for looking into this.
Cheers,
Orlando.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/19910] New: Unsigned arithmetic and %hi()/%low() operators,
orlandoarias at gmail dot com <=
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, orlandoarias at gmail dot com, 2016/04/05
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, nickc at redhat dot com, 2016/04/05
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, orlandoarias at gmail dot com, 2016/04/05
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, nickc at redhat dot com, 2016/04/05
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, orlandoarias at gmail dot com, 2016/04/05
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, gingold at adacore dot com, 2016/04/06
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, nickc at redhat dot com, 2016/04/06
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, nickc at redhat dot com, 2016/04/06
- [Bug gas/19910] Unsigned arithmetic and %hi()/%low() operators, nickc at redhat dot com, 2016/04/06