search for: getcharalign

Displaying 4 results from an estimated 4 matches for "getcharalign".

2018 May 01
2
Alignment Member Functions should be Virtual
...have developed a backend of new 32-bit RISC ISA, which does not have unaligned memory access instructions (e.g., LWL, LWR, SWL, and SWR in MIPS). Since char and short variables are not 32-bit alignment, these variables cannot be correctly accessed. Therefore, alignment member functions, especially getCharAlign() and getShortAlign() of TargetInfo class in clang/include/clang/Basic/TargetInfo.h, should be virtual, in order to achieve an ISA-specific alignment in an ISA-specific subclass of TargetInfo class. In my subclass, these return values are 32. Sincerely, Hiroyuki Chishiro -- Hiroyuki Chishiro &lt...
2018 May 02
0
Alignment Member Functions should be Virtual
...of new 32-bit RISC ISA, which does not have > unaligned memory access instructions (e.g., LWL, LWR, SWL, and SWR in > MIPS). > Since char and short variables are not 32-bit alignment, these > variables cannot be correctly accessed. > Therefore, alignment member functions, especially getCharAlign() and > getShortAlign() of TargetInfo class in > clang/include/clang/Basic/TargetInfo.h, should be virtual, in order to > achieve an ISA-specific alignment in an ISA-specific subclass of > TargetInfo class. > In my subclass, these return values are 32. Even if you fix TargetInfo, th...
2018 May 03
3
Alignment Member Functions should be Virtual
...3] ("*abc"), where '*' means an uninitialized value at address 0x10. If address 0x10 is NUL ('\0'), the char string misunderstands that it is an empty string. I do not try the array of short but the same case may happen. By this reason, aligned member functions, especially getCharAlign() and getShortAlign(), should be virtual. Sincerely, Hiroyuki Chishiro 2018-05-03 6:07 GMT+09:00 Friedman, Eli <efriedma at codeaurora.org>: > On 5/1/2018 4:35 AM, Hiroyuki Chishiro via llvm-dev wrote: >> >> Dear community, >> >> I have developed a backend of new...
2018 May 03
0
Alignment Member Functions should be Virtual
...ly common in the past, but code still accessed objects not aligned to 32-bits. The compiler just had to use multiple aligned loads to access data crossing a word boundary and combine the data. You'll probably find that path simpler than inventing a pathological C dialect. As Eli said, changing getCharAlign is likely to have huge knock-on consequences that the rest of Clang just isn't ready for. Cheers. Tim.