Discussion:
[Bug exp/20991] New: __int128 type support
tromey at sourceware dot org
2016-12-22 21:52:25 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20991

Bug ID: 20991
Summary: __int128 type support
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: exp
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

I tried a couple experiments with __int128 and found some gdb issues.

My test code:

__int128 x = 72;

I compiled with -g -c then ran gdb on the .o.

Printing kind of works, but chooses hex by default and zero-pads:

(gdb) p x
$1 = 0x00000000000000000000000000000048

Specifying decimal still zero-pads, which looks very weird:

(gdb) p/d x
$2 = 00000000000000000000000000000072

Addition doesn't work:

(gdb) p x + 5
That operation is not available on integers of more than 8 bytes.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2017-02-21 22:19:47 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20991

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
One super intrusive option would be to use GMP everywhere.

Another possibility would be to redefine LONGEST as __int128
where available.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2017-06-02 19:22:42 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20991

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Blocks| |21185
Depends on| |16225

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Handling the printing in bug 16225, so maybe this bug could be
for the operations. See some discussion in bug 21185 for how to do that.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=16225
[Bug 16225] __int128_t types print strangely
https://sourceware.org/bugzilla/show_bug.cgi?id=21185
[Bug 21185] add i128 and u128 support to rust
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2017-06-12 21:45:46 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20991
Bug 20991 depends on bug 16225, which changed state.

Bug 16225 Summary: __int128_t types print strangely
https://sourceware.org/bugzilla/show_bug.cgi?id=16225

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-04-30 16:32:55 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20991

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Another issue is that c-exp.y has productions for things like
"unsigned long" and "long unsigned" -- but there isn't one for
__int128. This came up during the alignment patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...