Fixes another failing test to pass on BigEndian.
Initial patch by Robin Dapp.
Reviewed-on: https://github.com/dlang/dmd/pull/9684
gcc/testsuite/ChangeLog:
2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
* gdc.test/README.gcc: New file.
From-SVN: r270536
-3b3dca8be201b443f17621cd29cf614007b5c75e
+423758078f8fcd945815a5294806915a8a01d392
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
+2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.test/README.gcc: New file.
+
2019-04-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90208
--- /dev/null
+The files in this subdirectory where noted are part of the D2
+programming language test suite for the Digitial Mars D compiler,
+hosted at https://github.com/dlang/dmd/.
+
+The current git revision number of these tests is maintained in
+gcc/d/dmd/MERGE.
+
+The following directories are part of DMD:
+ compilable/
+ fail_compilation/
+ runnable/
+
+All changes to dmd should go through the upstream repository first,
+then merged back to GCC.
int noswap245(ubyte *data)
{
- return
- (data[0]<< 0) |
- (data[1]<< 8) |
- (data[2]<< 16) |
- (data[3]<< 24);
+ version (LittleEndian)
+ return
+ (data[0]<< 0) |
+ (data[1]<< 8) |
+ (data[2]<< 16) |
+ (data[3]<< 24);
+ version (BigEndian)
+ return
+ (data[0]<< 24) |
+ (data[1]<< 16) |
+ (data[2]<< 8) |
+ (data[3]<< 0);
+
}
int bswap245(ubyte *data)
{
- return
- (data[0]<< 24) |
- (data[1]<< 16) |
- (data[2]<< 8 ) |
- (data[3]<< 0 );
+ version (LittleEndian)
+ return
+ (data[0]<< 24) |
+ (data[1]<< 16) |
+ (data[2]<< 8) |
+ (data[3]<< 0);
+ version (BigEndian)
+ return
+ (data[0]<< 0) |
+ (data[1]<< 8) |
+ (data[2]<< 16) |
+ (data[3]<< 24);
}
void test245()