From 98c25deec19039f61d3ea11e510e4628334c7da5 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 31 May 2014 16:29:28 +0300 Subject: [PATCH 1/3] Fix LZMA compilation on GCC with position-independent code (PIC) generation enabled EBX register is used Global Offset Table in PIC http://www.greyhat.ch/lab/downloads/pic.html --- lzma/C/CpuArch.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lzma/C/CpuArch.c b/lzma/C/CpuArch.c index 4b319fa88..925edbeb8 100644 --- a/lzma/C/CpuArch.c +++ b/lzma/C/CpuArch.c @@ -74,8 +74,24 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) *c = c2; *d = d2; + #elif __PIC__ + + /* GCC or Clang WITH position-independent code generation */ + + __asm__ __volatile__ ( + "xchgl %%ebx, %1\n" + "cpuid\n" + "xchgl %%ebx, %1\n" + : "=a" (*a) , + "=r" (*b) , + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + #else + /* GCC or Clang WITHOUT position-independent code generation */ + __asm__ __volatile__ ( "cpuid" : "=a" (*a) , From e8513a64edf92bb767560b2239c8f91a80ba802e Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sun, 1 Jun 2014 15:29:22 +1200 Subject: [PATCH 2/3] Rebuild nodes for hellfact map04 --- wadsrc/static/compatibility.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index e2516a30d..1c2307ec0 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -332,7 +332,7 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 setactivation 455 16 // SPAC_Push } - +8B2AC8D4DB4A49A5DCCBB067E04434D6 // The Hell Factory Hub One, map04 65A1EB4C87386F290816660A52932FF1 // Master Levels, garrison.wad { rebuildnodes From 3817bed0b3dcbc1dd85f6c1c745e5de9ba0b0759 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sun, 1 Jun 2014 18:11:50 +1200 Subject: [PATCH 3/3] Weap scroll could sometimes miss sameslot weapons In rear cases, when using next/prevweap, defined weapons in the same slot couldn't cycle when looping to another when you only had weapons in 1 slot. --- src/g_shared/a_weapons.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 6caf42b7d..fae232557 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -1143,7 +1143,7 @@ AWeapon *FWeaponSlots::PickNextWeapon(player_t *player) return weap; } } - while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS); + while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS); } return player->ReadyWeapon; } @@ -1198,7 +1198,7 @@ AWeapon *FWeaponSlots::PickPrevWeapon (player_t *player) return weap; } } - while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS); + while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS); } return player->ReadyWeapon; }