Hi Dale, > >> Treat struct { long long: 29; }; as int sized and > >> aligned, rather than long long. ABI issue. > > > > if you look at the DECL_SIZE of the bitfield, rather than > > the type size, I think it gives you 29. If so, DECL_SIZE > > should simplify things for you. In fact as far as I can > > see you should never use the type size for a record field. > > For example the struct conversion stuff uses DECL_SIZE everywhere > > (except at one point in the field indexing - I have a patch to fix > > that which I'll apply at some point). Not using the type size > > makes all these "it's a big type shoved in a small place" problems > > magically go away. > > I'm not sure what your suggestion is exactly; the issue isn't the > size, it is > that the code in HandleArgument for general RECORD_TYPEs is looking > at getDeclaredType, not the type in the field. (So what this patch > does is > use the INTEGER_REGS case instead.) The wide use of getDeclaredType > and the comments describing it make me think it would be unsafe in > general > to change that. It would certainly be more elegant if it works, though.
I guess I'm confused, but in the example are you saying that you want to pass this in registers as a long long? Or the opposite: you want to pass it as an i32 because it fits in 32 bits? Or something else? Thanks, D. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits