Displaying 6 results from an estimated 6 matches for "getvaluesize".
2011 Dec 20
4
[LLVMdev] Proposal for -filetype=obj full big endian support
...he effort was started, but never completed.
The proposal is to extend the MCDataFragment class to include a container
of offset/size that one can traverse generating each element in the correct
endianess:
// Pseudo code
for (iterator it = begin(), ie = end(); it != ie; ++it) {
switch (it.getValueSize()) {
default:
assert(0 && "Invalid size!");
case 1: OW->Write8 (uint8_t (it.getValue())); break;
case 2: OW->Write16(uint16_t(it.getValue())); break;
case 4: OW->Write32(uint32_t(it.getValue())); break;
case 8: OW->Write64(uint64_t...
2011 Dec 20
2
[LLVMdev] Proposal for -filetype=obj full big endian support
...pleted.
>
> The proposal is to extend the MCDataFragment class to include a container
> of offset/size that one can traverse generating each element in the correct
> endianess:
>
> // Pseudo code
> for (iterator it = begin(), ie = end(); it != ie; ++it) {
> switch (it.getValueSize()) {
> default:
> assert(0 && "Invalid size!");
> case 1: OW->Write8 (uint8_t (it.getValue())); break;
> case 2: OW->Write16(uint16_t(it.getValue())); break;
> case 4: OW->Write32(uint32_t(it.getValue())); break;
> c...
2011 Dec 20
0
[LLVMdev] Proposal for -filetype=obj full big endian support
...ed.
>
> The proposal is to extend the MCDataFragment class to include a container
> of offset/size that one can traverse generating each element in the correct
> endianess:
>
> // Pseudo code
> for (iterator it = begin(), ie = end(); it != ie; ++it) {
> switch (it.getValueSize()) {
> default:
> assert(0 && "Invalid size!");
> case 1: OW->Write8 (uint8_t (it.getValue())); break;
> case 2: OW->Write16(uint16_t(it.getValue())); break;
> case 4: OW->Write32(uint32_t(it.getValue())); break;
> c...
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast
infrastructure to handle this.
On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote:
> On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> TypeLoc casting looks bogus.
>>
>> TypeLoc derived types return true from classof when the dynamic type
>>
2011 Dec 20
0
[LLVMdev] Proposal for -filetype=obj full big endian support
...roposal is to extend the MCDataFragment class to include a container
>> of offset/size that one can traverse generating each element in the correct
>> endianess:
>>
>> // Pseudo code
>> for (iterator it = begin(), ie = end(); it != ie; ++it) {
>> switch (it.getValueSize()) {
>> default:
>> assert(0 && "Invalid size!");
>> case 1: OW->Write8 (uint8_t (it.getValue())); break;
>> case 2: OW->Write16(uint16_t(it.getValue())); break;
>> case 4: OW->Write32(uint32_t(it.getValue())); brea...
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
...3,7 @@
uint64_t FragmentSize = Asm.computeFragmentSize(Layout, F);
switch (F.getKind()) {
case MCFragment::FT_Align: {
- MCAlignFragment &AF = cast<MCAlignFragment>(F);
+ const MCAlignFragment &AF = cast<MCAlignFragment>(F);
uint64_t Count = FragmentSize / AF.getValueSize();
assert(AF.getValueSize() && "Invalid virtual align in concrete fragment!");
@@ -432,14 +432,14 @@
}
case MCFragment::FT_Data: {
- MCDataFragment &DF = cast<MCDataFragment>(F);
+ const MCDataFragment &DF = cast<MCDataFragment>(F);
as...