From 881b5756dc96dc33f6966ec6fccd324f63559dc2 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 14 Oct 2004 23:10:30 +0000 Subject: [PATCH] Bug #1628: Convert xf86{BusToMem,MemToBus} to PIC code, eliminating a text relocation and enabling the server to be built as a position-independent executable. (PaX Team) --- hw/xfree86/os-support/misc/BUSmemcpy.S | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/os-support/misc/BUSmemcpy.S b/hw/xfree86/os-support/misc/BUSmemcpy.S index e4ff36c62..373723c7d 100644 --- a/hw/xfree86/os-support/misc/BUSmemcpy.S +++ b/hw/xfree86/os-support/misc/BUSmemcpy.S @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */ /****************************************************************************** Copyright 1993 by Glenn G. Lai @@ -61,14 +61,11 @@ Austin, Tx 78765 copyright: STRING("Copyright 8/9/1993 by Glenn G. Lai") - ALIGNDATA4 -tmp: D_LONG 0 - SEG_TEXT ALIGNTEXT4 GLNAME(xf86BusToMem): CLD - MOV_L (ESI, CONTENT(tmp)) + PUSH_L (ESI) MOV_L (EDI, EDX) MOV_L (src, ESI) @@ -105,7 +102,7 @@ quickBM: REP MOVS_B return: - MOV_L (CONTENT(tmp), ESI) + POP_L (ESI) MOV_L (EDX, EDI) RET /************************/ @@ -113,7 +110,7 @@ return: ALIGNTEXT4 GLNAME(xf86MemToBus): CLD - MOV_L (ESI, CONTENT(tmp)) + PUSH_L (ESI) MOV_L (EDI, EDX) MOV_L (src, ESI) @@ -150,7 +147,7 @@ quickMB: REP MOVS_B - MOV_L (CONTENT(tmp), ESI) + POP_L (ESI) MOV_L (EDX, EDI) RET