[compiler-rt] r244646 - [ubsan][mips] Revise r243384 to avoid special casing big-endian mips.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 03:11:32 PDT 2015
Let's try that again, this time with the correct list CC'd. If Outlook is going to make me re-add the list manually on each reply, I guess I'll have to remove the old list from my autocomplete :-).
> -----Original Message-----
> From: Daniel Sanders
> Sent: 14 August 2015 11:08
> To: Daniel Sanders
> Cc: Sagar Thakur; Mohit Bhakkad; Jaydeep Patil; llvm-commits at cs.uiuc.edu;
> Hans Wennborg; Richard Smith
> Subject: RE: [compiler-rt] r244646 - [ubsan][mips] Revise r243384 to avoid
> special casing big-endian mips.
>
> That's odd. Richard and Hans are listed as recipients in my sent mail but don't
> show up the mail I received from llvm-commits. Attempting to re-add them.
>
> > -----Original Message-----
> > From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> Behalf
> > Of Daniel Sanders via llvm-commits
> > Sent: 11 August 2015 19:46
> > To: llvm-commits at lists.llvm.org
> > Cc: Sagar Thakur; Mohit Bhakkad; Jaydeep Patil
> > Subject: RE: [compiler-rt] r244646 - [ubsan][mips] Revise r243384 to avoid
> > special casing big-endian mips.
> >
> > This is the revision to r243384 that was requested in its merge request at
> > http://reviews.llvm.org/D11448. I've tested it on a big-endian MIPS system
> > as well as on my x86_64 system and it works correctly for me. I'm just
> waiting
> > for it to work it's way through the buildbots.
> >
> > Richard: Assuming the buildbots are ok, is this ok to merge to LLVM 3.7.0?
> > ________________________________________
> > From: llvm-commits [llvm-commits-bounces at lists.llvm.org] on behalf of
> > Daniel Sanders via llvm-commits [llvm-commits at lists.llvm.org]
> > Sent: 11 August 2015 19:40
> > To: llvm-commits at lists.llvm.org
> > Subject: [compiler-rt] r244646 - [ubsan][mips] Revise r243384 to avoid
> special
> > casing big-endian mips.
> >
> > Author: dsanders
> > Date: Tue Aug 11 13:40:02 2015
> > New Revision: 244646
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=244646&view=rev
> > Log:
> > [ubsan][mips] Revise r243384 to avoid special casing big-endian mips.
> >
> > Account for the case when uptr is 32-bit instead of trying to fix this case
> > using the little endian path.
> >
> > Modified:
> > compiler-rt/trunk/lib/ubsan/ubsan_value.cc
> >
> > Modified: compiler-rt/trunk/lib/ubsan/ubsan_value.cc
> > URL: http://llvm.org/viewvc/llvm-project/compiler-
> >
> rt/trunk/lib/ubsan/ubsan_value.cc?rev=244646&r1=244645&r2=244646&vie
> > w=diff
> >
> ==========================================================
> > ====================
> > --- compiler-rt/trunk/lib/ubsan/ubsan_value.cc (original)
> > +++ compiler-rt/trunk/lib/ubsan/ubsan_value.cc Tue Aug 11 13:40:02 2015
> > @@ -83,10 +83,11 @@ FloatMax Value::getFloatValue() const {
> > #endif
> > case 32: {
> > float Value;
> > -#if defined(__BIG_ENDIAN__) && !defined(__mips__)
> > - // For big endian the float value is in the second 4 bytes
> > - // instead of the first 4 bytes.
> > - internal_memcpy(&Value, ((const char*)&Val)+4, 4);
> > +#if defined(__BIG_ENDIAN__)
> > + // For big endian the float value is in the last 4 bytes.
> > + // On some targets we may only have 4 bytes so we count backwards
> > from
> > + // the end of Val to account for both the 32-bit and 64-bit cases.
> > + internal_memcpy(&Value, ((const char*)(&Val + 1)) - 4, 4);
> > #else
> > internal_memcpy(&Value, &Val, 4);
> > #endif
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list