dblaikie added a subscriber: paulsemel.
dblaikie added a comment.
Yeah, doesn't look like this code handles a value crossing the boundary of
the size of the bitfield type (it's reading only the low bit).
I suspect looking at the code that generates bitfield accesses would be
useful - and/or maybe
Yeah, doesn't look like this code handles a value crossing the boundary of
the size of the bitfield type (it's reading only the low bit).
I suspect looking at the code that generates bitfield accesses would be
useful - and/or maybe actually calling into that very code, rather than
reimplementing i
paulsemel updated this revision to Diff 153511.
paulsemel added a comment.
Fixed version problem. Now building.
Repository:
rC Clang
https://reviews.llvm.org/D47953
Files:
lib/CodeGen/CGBuiltin.cpp
Index: lib/CodeGen/CGBuiltin.cpp
=
paulsemel added a comment.
In https://reviews.llvm.org/D47953#1143044, @dblaikie wrote:
> This doesn't seem to build for me - so hard to debug/probe it:
>
> llvm/src/tools/clang/lib/CodeGen/CGBuiltin.cpp:1264:65: error: no viable
> conversion from 'clang::QualType' to 'llvm::Type *'
>
> CGF.CG
dblaikie added a comment.
This doesn't seem to build for me - so hard to debug/probe it:
llvm/src/tools/clang/lib/CodeGen/CGBuiltin.cpp:1264:65: error: no viable
conversion from 'clang::QualType' to 'llvm::Type *'
CGF.CGM.getDataLayout().getTypeSizeInBits(CanonicalType),
paulsemel added a comment.
First thanks all for reviewing !
Basically, what's happening is that it works good with non-packed structures.
Here is an example for packed structure (with unsigned signed short):
c
struct lol {
unsigned short a:3;
unsigned short b:2;
unsig
dblaikie added a comment.
Yeah, I know nothing about this dump feature or what's being fixed here - test
cases would be great to help motivate/explain.
Repository:
rC Clang
https://reviews.llvm.org/D47953
___
cfe-commits mailing list
cfe-commits
aaron.ballman added reviewers: echristo, rsmith, dblaikie.
aaron.ballman added a comment.
In https://reviews.llvm.org/D47953#1137375, @paulsemel wrote:
> I will for sure add tests @lebedev.ri . Fact is that, for the moment, this is
> not working as expected.
> This is why I am asking for a bit
paulsemel added a comment.
I will for sure add tests @lebedev.ri . Fact is that, for the moment, this is
not working as expected.
This is why I am asking for a bit of help about this bitfield handling :)
Comment at: lib/CodeGen/CGBuiltin.cpp:1250
+ if (Info.IsSigned) {
+
aaron.ballman added inline comments.
Comment at: lib/CodeGen/CGBuiltin.cpp:1250
+ if (Info.IsSigned) {
+unsigned HighBits = Info.StorageSize - Info.Offset - Info.Size;
+if (HighBits)
What happens if this overflows due to being < 0?
Reposito
lebedev.ri added a comment.
This seems to be missing tests.
Repository:
rC Clang
https://reviews.llvm.org/D47953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
paulsemel added a comment.
ping :) @aaron.ballman
Repository:
rC Clang
https://reviews.llvm.org/D47953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
paulsemel added a comment.
This version is working for non packed structures. For packed structures, it
might sometimes work, sometimes not.
The resulting assembly code seems to be the right one.
If someone went through bitfields manipulation, please do not hesitate to
comment !
Requesting for h
paulsemel created this revision.
paulsemel added a reviewer: aaron.ballman.
This is an attempt for adding bitfield support to __builtin_dump_struct.
Repository:
rC Clang
https://reviews.llvm.org/D47953
Files:
lib/CodeGen/CGBuiltin.cpp
Index: lib/CodeGen/CGBuiltin.cpp
14 matches
Mail list logo