Implement the following instructions, in both ARM and Thumb
encodings:
SSAX SXTAB16 SHASX SHSAX SHSUB16 SHSUB8
UASX USAX UQADD16 UQASX UQSAX UHASX UHSAX REVSH
Add support for
(T1) STRBT reg+#imm8
(T1) STRHT reg+#imm8
(T1) LDRBT reg+#imm8
(T1) LDRSBT reg+#imm8
(T1) PLI reg+#imm12
(T2) PLI reg-#imm8
(T3) PLI PC+/-#imm12
Mark Wielaard [Fri, 28 Jun 2013 14:03:58 +0000 (14:03 +0000)]
Bug 289360 parse_type_DIE confused by DW_TAG_enumeration_type.
GCC allows incomplete enums as GNU extension.
http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html
These are marked as DW_AT_declaration and won't have a size.
They can only be used in declaration or as pointer types.
You can't allocate variables or storage using such an enum type.
So don't require a size for such enum types.
Julian Seward [Thu, 27 Jun 2013 20:31:36 +0000 (20:31 +0000)]
Exit a bit more gracefully if a request to get part of an image
exceeds the allowable range. With this change, it should be
essentially impossible to crash V by feeding it invalid ELF or Dwarf.
Florian Krohm [Mon, 17 Jun 2013 21:03:56 +0000 (21:03 +0000)]
s390: Support some more BFP <-> DFP conversions (the ones
that were added in VEX r2727).
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
Florian Krohm [Mon, 17 Jun 2013 19:04:24 +0000 (19:04 +0000)]
valgrind side changes to support the new IRops introduced
in VEX r2727 (conversion ops between binary floating point and
decimal floating point).
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
Florian Krohm [Mon, 17 Jun 2013 18:59:51 +0000 (18:59 +0000)]
Add some more IRops to convert between binary floating point and
decimal floating point values. Needed to complete s390 DFP support.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
improve --help for --main-stacksize and supported ARM cpu
If the command line option --main-stacksize is not used,
the current ulimit value is used, with a min of 1MB
and a max of 16MB. Document this min/max default formula
in the --help.
Petar Jovanovic [Sun, 9 Jun 2013 16:46:14 +0000 (16:46 +0000)]
mips64: fix 'unused variable' warning
On a couple of places, the code expected either _MIPSEB or _MIPSEL flag to
use some variables, but none of these flags is set when the code is compiled
for non-MIPS architectures.
Florian Krohm [Thu, 6 Jun 2013 19:12:46 +0000 (19:12 +0000)]
Eliminate IRRoundingModeDFP by merging its values into IRRoundingMode.
Retain encodings. The rationale is that a rounding mode is an abstraction
and as such independent of formats used to represent numeric values.
This was triggered by the need for a rounding mode to express conversions
between binary floating point values and decimal floating point values.
Petar Jovanovic [Sun, 2 Jun 2013 18:08:04 +0000 (18:08 +0000)]
mips64: disable intercepting the spinlock function
This change disables intercepting pthread_spin_lock() for MIPS64, similar to
r13190 for MIPS32. Used in DRD and Helgrind as a workaround for the issue
#311690.
Petar Jovanovic [Sun, 2 Jun 2013 03:22:28 +0000 (03:22 +0000)]
update cond_ld_st test and expected outputs
Line numbers are off by one in some outputs since it differs on GCC version
how it will map source code to line number for the ternary operator written
in multiple lines.
This is small fix that replaces one occurrence of ternary operator with
if-then-else. The excepted outputs have been changed accordingly.
This fixes the test memcheck/tests/cond_ld_st for different platforms with
different GCC versions.
Petar Jovanovic [Sun, 2 Jun 2013 02:59:07 +0000 (02:59 +0000)]
add and update exp files for drd/tests/annotate_trace_memory
exp-32bit files needed minor update for the last store, and some mips32
platforms also need additional exp-mips32 due to different way of loading
and storing double values.
This fixes drd/tests/annotate_trace_memory on different 32-bit platforms.
Florian Krohm [Fri, 31 May 2013 15:44:06 +0000 (15:44 +0000)]
s390x: The CC_DEP1 field is accessed as a whole or bits [0:31]
in case the field holds a 32-bit floating point value.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
Florian Krohm [Fri, 31 May 2013 15:41:55 +0000 (15:41 +0000)]
s390x: Make the CC_DEP1 field appear completely initialised when
writing a 32-bit floating point value into it.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
Petar Jovanovic [Fri, 31 May 2013 15:09:56 +0000 (15:09 +0000)]
mips32/mips64: implement sdl, sdr, swl and swr without reading memory
New implementation of SDL, SDW, SWL and SWR instructions in a way in which
no memory read is required. This came as an issue for programs that map
memory as write-exec only.
fix 320211 Stack buffer overflow in ./coregrind/m_main.c with huge TMPDIR
* Addition of a function to compute size of buffer needed for VG_(mkstemp)
* Use it to dimension buffers for all VG_(mkstemp) calls.
Mark Wielaard [Wed, 22 May 2013 10:21:10 +0000 (10:21 +0000)]
Support Linux kernel AF_BLUETOOTH for bind().
Bug #320116. sockaddr_rc might contain some padding which might not be
initialized. Explicitly check the sockaddr_rc fields are set. That also
produces better diagnostics about which field is unitialized.
Petar Jovanovic [Sat, 11 May 2013 22:23:27 +0000 (22:23 +0000)]
mips: define allexec files as soft links
This change is a follow up to r13385. It removes physical copies of the
allexec c-files in none/tests/mips32/ and none/tests/mips64/ and defines
them as soft-links to a common file like other arches do.
Florian Krohm [Sat, 11 May 2013 15:02:58 +0000 (15:02 +0000)]
s390: First round of changes to support the PFPO insn.
Support these IROps:
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128,
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113
Julian Seward [Sat, 11 May 2013 13:42:08 +0000 (13:42 +0000)]
complainIfUndefined: reinstate the 3rd argument (guard) so as to make
the definedness check and possible shadow temp set-to-defined be
optional. Use this to properly instrument IRLoadG and IRStoreG, so
that if the load/store does not happen, not only is the validity of
the address not checked, neither is the definedness.
This fixes a regression introduced by the COMEM branch on ARM, in
which conditional loads/stores with addresses which are undefined at
runtime and with guards which are false, would generate false errors.
Also extensively re-checked the check-generation machinery and updated
a bunch of comments.
fix 319235 --db-attach=yes is broken with Yama ptrace scoping enabled
On Ubuntu systems, ptrace_scoping could forbid a process to ptrace another.
This ptrace scoping was already handled for vgdb by using SET_PTRACER
(the valgrind process must be ptraced by vgdb when it is blocked
in a syscall).
set_ptracer is however also needed when the old mechanism --db-attach=yes
is used.
The following changes are done:
* make the set_ptracer logic callable outside gdbserver
* make set_ptracer less restrictive (i.e. allow all
processes of the user to ptrace). This removes a limitation for vgdb.
* call the set_ptracer in the child launched for --db-attach=yes
* cleaned up the ptrace scope restriction message and doc as vgdb
is now working properly by default, even with ptrace_scope enabled.
Florian Krohm [Sun, 5 May 2013 15:04:30 +0000 (15:04 +0000)]
Add the following IROPs which are needed for s390 DFP support:
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128,
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113
fix gdbsrv inferior calls when PT_GNU_STACK declares stack not executable
With rev 13368, Valgrind obeys PT_GNU_STACK making the stack not
executable. This makes inferior function call with GDB >= 7.5 failing,
as GDB places a breakpoint on the stack, which must be decoded
and translated by Valgrind to have the inferior function call properly done.
=> introduce a special case in the conditions to allow translation
when a segment is not executable but is readable and there is a
breakpoint at the address.
Petar Jovanovic [Sat, 27 Apr 2013 01:15:48 +0000 (01:15 +0000)]
mips: fix corner case for INS instruction
This change fixes corner case for INS instruction when lsb = 0.
The test in none/tests/mips32/MIPS32int.c will be extended to include
additional test cases that trigger this condition.
STRD (both ARM and Thumb): for push-like cases -- specifically, STRD
rD1,rD2, [sp, #-8], generate IR for the SP writeback before the
stores. This loses restartability of the instruction but avoids
Memcheck complaining that we're writing below the stack pointer.
Minor changes to how V{LD}{1,2,3,4} are tested:
* print the output 64-bit results in most-to-least-significant
lane format
* change the memory values used in these tests to ones which
are reliably able to detect confusion of 8-bit lanes. The
previous values couldn't to that reliable. This change causes
the diff to be huge because the stdout.exp changes a lot.
Petar Jovanovic [Fri, 19 Apr 2013 15:23:44 +0000 (15:23 +0000)]
Calculate offsets in read_dwarf2_lineblock based on is64
Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:
Petar Jovanovic [Fri, 19 Apr 2013 12:35:00 +0000 (12:35 +0000)]
mips: fix endian issues for LWL, LWR, LDR and LDL for mips64
This change:
- fixes endian issues for unaligned loads for MIPS64,
- (re)moves endian dependencies in guest-to-IR for Iop_ReinterpI32asF32
and Iop_ReinterpI64asF64 to host-mips-isel,
- adds minor style changes in the area touched by the code.
Non-functional changes: flush stdout frequently, so as to make
it easier to sync with stderr output. Also, add some more helpful
data for testing Neon loads/stores.
Improved front end translations for Neon V{LD,ST}{1,2} instructions,
that do deinterleaving/interleaving via IROps and so generate far
fewer memory references. As a side effect, fix incorrect ARM back end
implementation of many of the SIMD lane interleaving/deinterleaving
and concatenation IROps.
Mark Wielaard [Wed, 17 Apr 2013 19:11:05 +0000 (19:11 +0000)]
Fix -Ttext-segment configure check.
Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.