* gdb prints only 128 bits of a YMM register (AVX)
@ 2015-07-27 12:47 Laurent ML
2015-07-29 11:48 ` Tedeschi, Walfred
0 siblings, 1 reply; 3+ messages in thread
From: Laurent ML @ 2015-07-27 12:47 UTC (permalink / raw)
To: gdb
Hello,
I have created a small C program that uses AVX extensions, and I have
compiled it with options -03 -mavx.
Next I used GDB to print the content of YMM registers, but each time I
print the content of one of the YMM register, gdb prints only the
highest 128 bits of the registers:
Breakpoint 1, 0x0000000000400a70 in func2_compare_32bitsPack ()
$1 = ">"
$2 = {0xffffffffffff00000000000000000000, 0x00000000000000000000000000000000}
$3 = {0x0000000000006e6f73697261706d6f43, 0x00000000000000000000000000000000}
$4 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$5 = {0x000000000000ff000000000000ffffff, 0x00000000000000000000000000000000}
$6 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$7 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$8 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$9 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$10 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$11 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$12 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$13 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$14 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$15 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$16 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$17 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
Is there a way to get the last part of the register ?
I used gdb on EL7 :
$ gdb -v
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
Thanks for your help.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: gdb prints only 128 bits of a YMM register (AVX)
2015-07-27 12:47 gdb prints only 128 bits of a YMM register (AVX) Laurent ML
@ 2015-07-29 11:48 ` Tedeschi, Walfred
2015-07-31 8:53 ` Laurent ML
0 siblings, 1 reply; 3+ messages in thread
From: Tedeschi, Walfred @ 2015-07-29 11:48 UTC (permalink / raw)
To: Laurent ML; +Cc: gdb
Hello Laurent,
I did not understand how you are trying to see register values from the example bellow.
Have you used print $ymm0 or info register?
Thanks and regards,
-Fred
-----Original Message-----
From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf Of Laurent ML
Sent: Monday, July 27, 2015 2:48 PM
To: gdb@gnu.org
Subject: gdb prints only 128 bits of a YMM register (AVX)
Hello,
I have created a small C program that uses AVX extensions, and I have compiled it with options -03 -mavx.
Next I used GDB to print the content of YMM registers, but each time I print the content of one of the YMM register, gdb prints only the highest 128 bits of the registers:
Breakpoint 1, 0x0000000000400a70 in func2_compare_32bitsPack ()
$1 = ">"
$2 = {0xffffffffffff00000000000000000000, 0x00000000000000000000000000000000}
$3 = {0x0000000000006e6f73697261706d6f43, 0x00000000000000000000000000000000}
$4 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$5 = {0x000000000000ff000000000000ffffff, 0x00000000000000000000000000000000}
$6 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$7 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$8 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$9 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$10 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$11 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$12 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$13 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$14 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$15 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$16 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
$17 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
Is there a way to get the last part of the register ?
I used gdb on EL7 :
$ gdb -v
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
Thanks for your help.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gdb prints only 128 bits of a YMM register (AVX)
2015-07-29 11:48 ` Tedeschi, Walfred
@ 2015-07-31 8:53 ` Laurent ML
0 siblings, 0 replies; 3+ messages in thread
From: Laurent ML @ 2015-07-31 8:53 UTC (permalink / raw)
To: Tedeschi, Walfred; +Cc: gdb
Hi,
I ran this set like below in gdb:
b func2_compare_32bitsPack
commands 1
print $ymm1.v2_int128
print $ymm2.v2_int128
print $ymm3.v2_int128
print $ymm4.v2_int128
print $ymm5.v2_int128
print $ymm6.v2_int128
print $ymm7.v2_int128
print $ymm8.v2_int128
print $ymm9.v2_int128
print $ymm10.v2_int128
print $ymm11.v2_int128
print $ymm12.v2_int128
print $ymm13.v2_int128
print $ymm14.v2_int128
print $ymm15.v2_int128
continue
end
Concerning my problem, I found the reason: it's because of the
compiler optimization. If I compile my program without using any
optimization switch, the AVX register is completely set.
Thanks,
Laurent
On Wed, Jul 29, 2015 at 1:48 PM, Tedeschi, Walfred
<walfred.tedeschi@intel.com> wrote:
> Hello Laurent,
>
> I did not understand how you are trying to see register values from the example bellow.
>
> Have you used print $ymm0 or info register?
>
> Thanks and regards,
> -Fred
>
> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf Of Laurent ML
> Sent: Monday, July 27, 2015 2:48 PM
> To: gdb@gnu.org
> Subject: gdb prints only 128 bits of a YMM register (AVX)
>
> Hello,
>
> I have created a small C program that uses AVX extensions, and I have compiled it with options -03 -mavx.
> Next I used GDB to print the content of YMM registers, but each time I print the content of one of the YMM register, gdb prints only the highest 128 bits of the registers:
>
> Breakpoint 1, 0x0000000000400a70 in func2_compare_32bitsPack ()
> $1 = ">"
> $2 = {0xffffffffffff00000000000000000000, 0x00000000000000000000000000000000}
> $3 = {0x0000000000006e6f73697261706d6f43, 0x00000000000000000000000000000000}
> $4 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $5 = {0x000000000000ff000000000000ffffff, 0x00000000000000000000000000000000}
> $6 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $7 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $8 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $9 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $10 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $11 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $12 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $13 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $14 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $15 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $16 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
> $17 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}
>
> Is there a way to get the last part of the register ?
>
> I used gdb on EL7 :
> $ gdb -v
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
>
> Thanks for your help.
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
> Chairperson of the Supervisory Board: Tiffany Doon Silva
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-31 8:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 12:47 gdb prints only 128 bits of a YMM register (AVX) Laurent ML
2015-07-29 11:48 ` Tedeschi, Walfred
2015-07-31 8:53 ` Laurent ML
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).