mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 23:29:22 +00:00
rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dc0a5fd226
commit
fd0543d9be
@ -422,7 +422,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkipToWord() {
|
void SkipToFourByteBoundary() {
|
||||||
BitsInCurWord = 0;
|
BitsInCurWord = 0;
|
||||||
CurWord = 0;
|
CurWord = 0;
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@ public:
|
|||||||
// Read and ignore the codelen value. Since we are skipping this block, we
|
// Read and ignore the codelen value. Since we are skipping this block, we
|
||||||
// don't care what code widths are used inside of it.
|
// don't care what code widths are used inside of it.
|
||||||
ReadVBR(bitc::CodeLenWidth);
|
ReadVBR(bitc::CodeLenWidth);
|
||||||
SkipToWord();
|
SkipToFourByteBoundary();
|
||||||
unsigned NumWords = Read(bitc::BlockSizeWidth);
|
unsigned NumWords = Read(bitc::BlockSizeWidth);
|
||||||
|
|
||||||
// Check that the block wasn't partially defined, and that the offset isn't
|
// Check that the block wasn't partially defined, and that the offset isn't
|
||||||
@ -470,7 +470,7 @@ public:
|
|||||||
|
|
||||||
// Block tail:
|
// Block tail:
|
||||||
// [END_BLOCK, <align4bytes>]
|
// [END_BLOCK, <align4bytes>]
|
||||||
SkipToWord();
|
SkipToFourByteBoundary();
|
||||||
|
|
||||||
popBlockScope();
|
popBlockScope();
|
||||||
return false;
|
return false;
|
||||||
|
@ -78,7 +78,7 @@ bool BitstreamCursor::EnterSubBlock(unsigned BlockID, unsigned *NumWordsP) {
|
|||||||
|
|
||||||
// Get the codesize of this block.
|
// Get the codesize of this block.
|
||||||
CurCodeSize = ReadVBR(bitc::CodeLenWidth);
|
CurCodeSize = ReadVBR(bitc::CodeLenWidth);
|
||||||
SkipToWord();
|
SkipToFourByteBoundary();
|
||||||
unsigned NumWords = Read(bitc::BlockSizeWidth);
|
unsigned NumWords = Read(bitc::BlockSizeWidth);
|
||||||
if (NumWordsP) *NumWordsP = NumWords;
|
if (NumWordsP) *NumWordsP = NumWords;
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ void BitstreamCursor::skipRecord(unsigned AbbrevID) {
|
|||||||
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
|
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
|
||||||
// Blob case. Read the number of bytes as a vbr6.
|
// Blob case. Read the number of bytes as a vbr6.
|
||||||
unsigned NumElts = ReadVBR(6);
|
unsigned NumElts = ReadVBR(6);
|
||||||
SkipToWord(); // 32-bit alignment
|
SkipToFourByteBoundary(); // 32-bit alignment
|
||||||
|
|
||||||
// Figure out where the end of this blob will be including tail padding.
|
// Figure out where the end of this blob will be including tail padding.
|
||||||
size_t NewEnd = NextChar+((NumElts+3)&~3);
|
size_t NewEnd = NextChar+((NumElts+3)&~3);
|
||||||
@ -241,7 +241,7 @@ unsigned BitstreamCursor::readRecord(unsigned AbbrevID,
|
|||||||
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
|
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
|
||||||
// Blob case. Read the number of bytes as a vbr6.
|
// Blob case. Read the number of bytes as a vbr6.
|
||||||
unsigned NumElts = ReadVBR(6);
|
unsigned NumElts = ReadVBR(6);
|
||||||
SkipToWord(); // 32-bit alignment
|
SkipToFourByteBoundary(); // 32-bit alignment
|
||||||
|
|
||||||
// Figure out where the end of this blob will be including tail padding.
|
// Figure out where the end of this blob will be including tail padding.
|
||||||
size_t NewEnd = NextChar+((NumElts+3)&~3);
|
size_t NewEnd = NextChar+((NumElts+3)&~3);
|
||||||
|
Loading…
Reference in New Issue
Block a user