mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
It is obvious that this has never been used for outputing more than a single
byte, it's totally endian incorrect! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44e38034d5
commit
0a3a27b0ae
@ -123,17 +123,8 @@ static inline void output(const std::string &s, std::deque<unsigned char> &Out,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void output_data(const void *Ptr, const void *End,
|
static inline void output_data(const void *Ptr, const void *End,
|
||||||
std::deque<unsigned char> &Out,
|
std::deque<unsigned char> &Out) {
|
||||||
bool Align = false) {
|
|
||||||
#ifdef ENDIAN_LITTLE
|
|
||||||
Out.insert(Out.end(), (const unsigned char*)Ptr, (const unsigned char*)End);
|
Out.insert(Out.end(), (const unsigned char*)Ptr, (const unsigned char*)End);
|
||||||
#else
|
|
||||||
const unsigned char *E = (const unsigned char *)End;
|
|
||||||
while (Ptr != E)
|
|
||||||
Out.push_back(*--E);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Align) align32(Out);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user