From f73cd8b6dbc73b0d482e740eddbf9df6b934e7da Mon Sep 17 00:00:00 2001 From: Thiago Macieira <thiago.macieira@intel.com> Date: Tue, 17 Dec 2013 18:42:34 -0800 Subject: [PATCH] Add AVX types __m256, __m256d and __m256i to the dumpers Change-Id: I16126091c8c3a241d0b91534ecdb5f0cbf7d5bd5 Reviewed-by: hjk <hjk121@nokiamail.com> --- share/qtcreator/debugger/misctypes.py | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py index d5233778cc5..8cd6f8f2899 100644 --- a/share/qtcreator/debugger/misctypes.py +++ b/share/qtcreator/debugger/misctypes.py @@ -41,12 +41,24 @@ def qdump____m128(d, value): if d.isExpanded(): d.putArrayData(d.lookupType("float"), value.address, 4) +def qdump____m256(d, value): + d.putEmptyValue() + d.putNumChild(1) + if d.isExpanded(): + d.putArrayData(d.lookupType("float"), value.address, 8) + def qdump____m128d(d, value): d.putEmptyValue() d.putNumChild(1) if d.isExpanded(): d.putArrayData(d.lookupType("double"), value.address, 2) +def qdump____m256d(d, value): + d.putEmptyValue() + d.putNumChild(1) + if d.isExpanded(): + d.putArrayData(d.lookupType("double"), value.address, 4) + def qdump____m128i(d, value): data = d.readMemory(value.address, 16) d.putValue(':'.join("%04x" % int(data[i:i+4], 16) for i in xrange(0, 32, 4))) @@ -72,6 +84,31 @@ def qdump____m128i(d, value): d.putType("unsigned long long [2]") d.putArrayData(d.lookupType("unsigned long long"), value.address, 2) +def qdump____m256i(d, value): + data = d.readMemory(value.address, 32) + d.putValue(':'.join("%04x" % int(data[i:i+4], 16) for i in xrange(0, 64, 4))) + d.putNumChild(4) + if d.isExpanded(): + # fake 4 children as arrays + with Children(d): + with SubItem(d, "uint8x32"): + d.putEmptyValue() + d.putType("unsigned char [32]") + d.putArrayData(d.lookupType("unsigned char"), value.address, 32) + d.putAddress(value.address) + with SubItem(d, "uint16x8"): + d.putEmptyValue() + d.putType("unsigned short [16]") + d.putArrayData(d.lookupType("unsigned short"), value.address, 16) + with SubItem(d, "uint32x8"): + d.putEmptyValue() + d.putType("unsigned int [8]") + d.putArrayData(d.lookupType("unsigned int"), value.address, 8) + with SubItem(d, "uint64x4"): + d.putEmptyValue() + d.putType("unsigned long long [4]") + d.putArrayData(d.lookupType("unsigned long long"), value.address, 4) + ####################################################################### # # Eigen -- GitLab