Hello community, here is the log from the commit of package libx86emu for openSUSE:Factory checked in at 2017-09-13 21:37:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libx86emu (Old) and /work/SRC/openSUSE:Factory/.libx86emu.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libx86emu" Wed Sep 13 21:37:09 2017 rev:20 rq:523692 version:1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/libx86emu/libx86emu.changes 2016-06-29 15:04:09.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libx86emu.new/libx86emu.changes 2017-09-13 21:37:19.447193303 +0200 @@ -0,0 +1,8 @@ +-------------------------------------------------------------------- +Tue Sep 12 11:49:46 UTC 2017 - wfe...@opensuse.org + +- merge gh#wfeldt/libx86emu#9 +- add proper LICENSE file (containing the actual license) and add + it consistently to all source files +- 1.12 + Old: ---- libx86emu-1.11.tar.xz New: ---- libx86emu-1.12.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libx86emu.spec ++++++ --- /var/tmp/diff_new_pack.cHhn8s/_old 2017-09-13 21:37:21.098960899 +0200 +++ /var/tmp/diff_new_pack.cHhn8s/_new 2017-09-13 21:37:21.098960899 +0200 @@ -1,7 +1,7 @@ # # spec file for package libx86emu # -# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2008 Steffen Winterfeldt # # All modifications and additions to the file contributed by third parties @@ -24,7 +24,7 @@ Summary: A small x86 emulation library. License: BSD-3-Clause Group: System/Libraries -Version: 1.11 +Version: 1.12 Release: 0 PreReq: /sbin/ldconfig Source: %{name}-%{version}.tar.xz @@ -87,7 +87,7 @@ %files -n libx86emu1 %defattr(-,root,root) %{_libdir}/*.so.* -%doc README.md LICENSE +%doc README.md LICENSE* %files -n libx86emu-devel %defattr(-,root,root) ++++++ libx86emu-1.11.tar.xz -> libx86emu-1.12.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/LICENSE new/libx86emu-1.12/LICENSE --- old/libx86emu-1.11/LICENSE 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/LICENSE 2017-09-12 13:49:46.000000000 +0200 @@ -1,17 +1,22 @@ - License information - ------------------- +Copyright (c) 1996-1999 SciTech Software, Inc. +Copyright (c) David Mosberger-Tang +Copyright (c) 1999 Egbert Eich +Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt -The x86emu library is under a BSD style license, comaptible -with the XFree86 and X licenses used by XFree86. The -original x86emu libraries were under the GNU General Public -License. Due to license incompatibilities between the GPL -and the XFree86 license, the original authors of the code -decided to allow a license change. If you have submitted -code to the original x86emu project, and you don't agree -with the license change, please contact us and let you -know. Your code will be removed to comply with your wishes. - -If you have any questions about this, please send email to -x86...@linuxlabs.com or kenda...@scitechsoft.com for -clarification. +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the authors not be used +in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. The authors makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. +THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/LICENSE_INFO new/libx86emu-1.12/LICENSE_INFO --- old/libx86emu-1.11/LICENSE_INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/libx86emu-1.12/LICENSE_INFO 2017-09-12 13:49:46.000000000 +0200 @@ -0,0 +1,17 @@ + License information + ------------------- + +The x86emu library is under a BSD style license, comaptible +with the XFree86 and X licenses used by XFree86. The +original x86emu libraries were under the GNU General Public +License. Due to license incompatibilities between the GPL +and the XFree86 license, the original authors of the code +decided to allow a license change. If you have submitted +code to the original x86emu project, and you don't agree +with the license change, please contact us and let you +know. Your code will be removed to comply with your wishes. + +If you have any questions about this, please send email to +x86...@linuxlabs.com or kenda...@scitechsoft.com for +clarification. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/VERSION new/libx86emu-1.12/VERSION --- old/libx86emu-1.11/VERSION 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/VERSION 2017-09-12 13:49:46.000000000 +0200 @@ -1 +1 @@ -1.11 +1.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/api.c new/libx86emu-1.12/api.c --- old/libx86emu-1.11/api.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/api.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,3 +1,37 @@ +/**************************************************************************** +* +* Realmode X86 Emulator Library +* +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Description: +* Public interface functions. +* +****************************************************************************/ + + #include "include/x86emu_int.h" #define LINE_LEN 16 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/changelog new/libx86emu-1.12/changelog --- old/libx86emu-1.11/changelog 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/changelog 2017-09-12 13:49:46.000000000 +0200 @@ -1,3 +1,6 @@ +2017-09-12: 1.12 + - add proper LICENSE file (containing the actual license) and add it consistently to all source files + 2016-04-11: 1.11 - Add tests for retn/retf instructions - Small compatibility fixes for msvc compiler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/decode.c new/libx86emu-1.12/decode.c --- old/libx86emu-1.11/decode.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/decode.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,12 +29,8 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: This file includes subroutines which are related to -* instruction decoding and accessess of immediate data via IP. etc. +* Description: +* Subroutines related to instruction decoding and logging. * ****************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/decode.h new/libx86emu-1.12/include/decode.h --- old/libx86emu-1.11/include/decode.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/decode.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,14 +29,12 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: Header file for instruction decoding logic. +* Description: +* Header file for instruction decoding logic. * ****************************************************************************/ + #ifndef __X86EMU_DECODE_H #define __X86EMU_DECODE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/mem.h new/libx86emu-1.12/include/mem.h --- old/libx86emu-1.11/include/mem.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/mem.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,3 +1,37 @@ +/**************************************************************************** +* +* Realmode X86 Emulator Library +* +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Description: +* Header file for memory and i/o access emulation functions. +* +****************************************************************************/ + + unsigned vm_memio(x86emu_t *emu, u32 addr, u32 *val, unsigned type) L_SYM; x86emu_mem_t *emu_mem_new(unsigned perm) L_SYM; x86emu_mem_t *emu_mem_free(x86emu_mem_t *mem) L_SYM; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/ops.h new/libx86emu-1.12/include/ops.h --- old/libx86emu-1.11/include/ops.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/ops.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,14 +29,12 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: Header file for operand decoding functions. +* Description: +* Header file for operand decoding functions. * ****************************************************************************/ + #ifndef __X86EMU_OPS_H #define __X86EMU_OPS_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/prim_ops.h new/libx86emu-1.12/include/prim_ops.h --- old/libx86emu-1.11/include/prim_ops.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/prim_ops.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,14 +29,12 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: Header file for primitive operation functions. +* Description: +* Header file for primitive operation functions. * ****************************************************************************/ + #ifndef __X86EMU_PRIM_OPS_H #define __X86EMU_PRIM_OPS_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/x86emu.h new/libx86emu-1.12/include/x86emu.h --- old/libx86emu-1.11/include/x86emu.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/x86emu.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,16 +29,14 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: Header file for public specific functions. -* Any application linking against us should only -* include this header +* Description: +* Header file for public interface functions. +* +* Applications linking against libx86emu should only include this header. * ****************************************************************************/ + #ifndef __X86EMU_X86EMU_H #define __X86EMU_X86EMU_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/include/x86emu_int.h new/libx86emu-1.12/include/x86emu_int.h --- old/libx86emu-1.11/include/x86emu_int.h 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/include/x86emu_int.h 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,8 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,13 +26,8 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: Header file for system specific functions. These functions -* are always compiled and linked in the OS depedent libraries, -* and never in a binary portable driver. +* Description: +* Header file for library internal macros and definitions. * ****************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/mem.c new/libx86emu-1.12/mem.c --- old/libx86emu-1.11/mem.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/mem.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,3 +1,37 @@ +/**************************************************************************** +* +* Realmode X86 Emulator Library +* +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Description: +* Memory and i/o access emulation functions. +* +****************************************************************************/ + + #include "include/x86emu_int.h" #if defined(__i386__) || defined (__x86_64__) #include <sys/io.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/ops.c new/libx86emu-1.12/ops.c --- old/libx86emu-1.11/ops.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/ops.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,43 +29,40 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: This file includes subroutines to implement the decoding -* and emulation of all the x86 processor instructions. -* -* There are approximately 250 subroutines in here, which correspond -* to the 256 byte-"opcodes" found on the 8086. The table which -* dispatches this is found in the files optab.[ch]. -* -* Each opcode proc has a comment preceeding it which gives it's table -* address. Several opcodes are missing (undefined) in the table. -* -* Each proc includes information for decoding (OP_DECODE). -* -* Many of the procedures are *VERY* similar in coding. This has -* allowed for a very large amount of code to be generated in a fairly -* short amount of time (i.e. cut, paste, and modify). The result is -* that much of the code below could have been folded into subroutines -* for a large reduction in size of this file. The downside would be -* that there would be a penalty in execution speed. The file could -* also have been *MUCH* larger by inlining certain functions which -* were called. This could have resulted even faster execution. The -* prime directive I used to decide whether to inline the code or to -* modularize it, was basically: 1) no unnecessary subroutine calls, -* 2) no routines more than about 200 lines in size, and 3) modularize -* any code that I might not get right the first time. The fetch_* -* subroutines fall into the latter category. The The decode_* fall -* into the second category. The coding of the "switch(mod){ .... }" -* in many of the subroutines below falls into the first category. -* Especially, the coding of {add,and,or,sub,...}_{byte,word} -* subroutines are an especially glaring case of the third guideline. -* Since so much of the code is cloned from other modules (compare -* opcode #00 to opcode #01), making the basic operations subroutine -* calls is especially important; otherwise mistakes in coding an -* "add" would represent a nightmare in maintenance. +* Description: +* Subroutines to implement the decoding and emulation of all the +* x86 processor instructions. +* +* There are approximately 250 subroutines in here, which correspond +* to the 256 byte-"opcodes" found on the 8086. The table which +* dispatches this is found in the files optab.[ch]. +* +* Each opcode proc has a comment preceeding it which gives it's table +* address. Several opcodes are missing (undefined) in the table. +* +* Each proc includes information for decoding (OP_DECODE). +* +* Many of the procedures are *VERY* similar in coding. This has +* allowed for a very large amount of code to be generated in a fairly +* short amount of time (i.e. cut, paste, and modify). The result is +* that much of the code below could have been folded into subroutines +* for a large reduction in size of this file. The downside would be +* that there would be a penalty in execution speed. The file could +* also have been *MUCH* larger by inlining certain functions which +* were called. This could have resulted even faster execution. The +* prime directive I used to decide whether to inline the code or to +* modularize it, was basically: 1) no unnecessary subroutine calls, +* 2) no routines more than about 200 lines in size, and 3) modularize +* any code that I might not get right the first time. The fetch_* +* subroutines fall into the latter category. The The decode_* fall +* into the second category. The coding of the "switch(mod){ .... }" +* in many of the subroutines below falls into the first category. +* Especially, the coding of {add,and,or,sub,...}_{byte,word} +* subroutines are an especially glaring case of the third guideline. +* Since so much of the code is cloned from other modules (compare +* opcode #00 to opcode #01), making the basic operations subroutine +* calls is especially important; otherwise mistakes in coding an +* "add" would represent a nightmare in maintenance. * ****************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/ops2.c new/libx86emu-1.12/ops2.c --- old/libx86emu-1.11/ops2.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/ops2.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,16 +29,13 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: This file includes subroutines to implement the decoding -* and emulation of all the x86 extended two-byte processor -* instructions. +* Description: +* Subroutines to implement the decoding and emulation of all the x86 +* extended two-byte processor instructions. * ****************************************************************************/ + #include "include/x86emu_int.h" /*----------------------------- Implementation ----------------------------*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/prim_ops.c new/libx86emu-1.12/prim_ops.c --- old/libx86emu-1.11/prim_ops.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/prim_ops.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,10 +1,11 @@ /**************************************************************************** * -* Realmode X86 Emulator Library +* Realmode X86 Emulator Library * -* Copyright (C) 1996-1999 SciTech Software, Inc. -* Copyright (C) David Mosberger-Tang -* Copyright (C) 1999 Egbert Eich +* Copyright (c) 1996-1999 SciTech Software, Inc. +* Copyright (c) David Mosberger-Tang +* Copyright (c) 1999 Egbert Eich +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt * * ======================================================================== * @@ -28,75 +29,73 @@ * * ======================================================================== * -* Language: ANSI C -* Environment: Any -* Developer: Kendall Bennett -* -* Description: This file contains the code to implement the primitive -* machine operations used by the emulation code in ops.c -* -* Carry Chain Calculation -* -* This represents a somewhat expensive calculation which is -* apparently required to emulate the setting of the OF and AF flag. -* The latter is not so important, but the former is. The overflow -* flag is the XOR of the top two bits of the carry chain for an -* addition (similar for subtraction). Since we do not want to -* simulate the addition in a bitwise manner, we try to calculate the -* carry chain given the two operands and the result. -* -* So, given the following table, which represents the addition of two -* bits, we can derive a formula for the carry chain. -* -* a b cin r cout -* 0 0 0 0 0 -* 0 0 1 1 0 -* 0 1 0 1 0 -* 0 1 1 0 1 -* 1 0 0 1 0 -* 1 0 1 0 1 -* 1 1 0 0 1 -* 1 1 1 1 1 -* -* Construction of table for cout: -* -* ab -* r \ 00 01 11 10 -* |------------------ -* 0 | 0 1 1 1 -* 1 | 0 0 1 0 -* -* By inspection, one gets: cc = ab + r'(a + b) -* -* That represents alot of operations, but NO CHOICE.... -* -* Borrow Chain Calculation. -* -* The following table represents the subtraction of two bits, from -* which we can derive a formula for the borrow chain. -* -* a b bin r bout -* 0 0 0 0 0 -* 0 0 1 1 1 -* 0 1 0 1 1 -* 0 1 1 0 1 -* 1 0 0 1 0 -* 1 0 1 0 0 -* 1 1 0 0 0 -* 1 1 1 1 1 -* -* Construction of table for cout: -* -* ab -* r \ 00 01 11 10 -* |------------------ -* 0 | 0 1 0 0 -* 1 | 1 1 1 0 +* Description: +* Implement the primitive machine operations used by the emulation code +* in ops.c +* +* Carry Chain Calculation +* +* This represents a somewhat expensive calculation which is +* apparently required to emulate the setting of the OF and AF flag. +* The latter is not so important, but the former is. The overflow +* flag is the XOR of the top two bits of the carry chain for an +* addition (similar for subtraction). Since we do not want to +* simulate the addition in a bitwise manner, we try to calculate the +* carry chain given the two operands and the result. +* +* So, given the following table, which represents the addition of two +* bits, we can derive a formula for the carry chain. +* +* a b cin r cout +* 0 0 0 0 0 +* 0 0 1 1 0 +* 0 1 0 1 0 +* 0 1 1 0 1 +* 1 0 0 1 0 +* 1 0 1 0 1 +* 1 1 0 0 1 +* 1 1 1 1 1 +* +* Construction of table for cout: +* +* ab +* r \ 00 01 11 10 +* |------------------ +* 0 | 0 1 1 1 +* 1 | 0 0 1 0 +* +* By inspection, one gets: cc = ab + r'(a + b) +* +* That represents alot of operations, but NO CHOICE.... +* +* Borrow Chain Calculation. +* +* The following table represents the subtraction of two bits, from +* which we can derive a formula for the borrow chain. +* +* a b bin r bout +* 0 0 0 0 0 +* 0 0 1 1 1 +* 0 1 0 1 1 +* 0 1 1 0 1 +* 1 0 0 1 0 +* 1 0 1 0 0 +* 1 1 0 0 0 +* 1 1 1 1 1 +* +* Construction of table for cout: +* +* ab +* r \ 00 01 11 10 +* |------------------ +* 0 | 0 1 0 0 +* 1 | 1 1 1 0 * -* By inspection, one gets: bc = a'b + r(a' + b) +* By inspection, one gets: bc = a'b + r(a' + b) * ****************************************************************************/ + #include "include/x86emu_int.h" /*------------------------- Global Variables ------------------------------*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libx86emu-1.11/test/x86test.c new/libx86emu-1.12/test/x86test.c --- old/libx86emu-1.11/test/x86test.c 2016-06-22 14:15:06.000000000 +0200 +++ new/libx86emu-1.12/test/x86test.c 2017-09-12 13:49:46.000000000 +0200 @@ -1,3 +1,37 @@ +/**************************************************************************** +* +* Realmode X86 Emulator Library +* +* Copyright (c) 2007-2017 SUSE LINUX GmbH; Author: Steffen Winterfeldt +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Description: +* Program to run test suite. +* +****************************************************************************/ + + #define _GNU_SOURCE #include <stdio.h>