Commit Graph

17 Commits

Author SHA1 Message Date
H.J. Lu
cd888f01a4 x86: Add ENDBR32/ENDBR64 at function entries for Intel CET
To support Intel CET, all indirect branch targets must start with
ENDBR32/ENDBR64.  Here is a patch to define endbranch and add it to
function entries in x86 assembly codes which are indirect branch
targets as discovered by running testsuite on Intel CET machine and
visual inspection.

Verified with

$ CC="gcc -Wl,-z,cet-report=error -fcf-protection" CXX="g++ -Wl,-z,cet-report=error -fcf-protection" .../configure x86_64-linux
$ make -j8
$ make -j8 check

with both nasm and yasm on both CET and non-CET machines.

Change-Id: I9822578e7294fb5043a64ab7de5c41de81a7d337
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2020-05-26 09:16:49 -07:00
Greg Tucker
ede04f0a1f build: Fix for windows to allow nasm use
Previously windows build could only use yasm because some procedural items such
as proc_start were not supported by nasm.  This adds a few macros and fixes so
nasm can be used to build on windows.

Change-Id: Ia05dc3ff482f33b0f915bb1be3c7df5e4a753b3a
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2020-03-17 18:05:46 -07:00
Roy Oursler
7345490999 igzip: Modify igzip_body assembly to run to last 16 bytes.
Change-Id: Ib2c688d0b2d7ff5d4fd7b14bb6eea72a7f689cd3
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Greg Tucker
b1c4517557 igzip: Add a few missing asm copyright headers
Change-Id: Iddcfbd357efa17dbbd32acacac952579fc052756
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-21 14:50:40 -07:00
Roy Oursler
d389b8d6f8 igzip: Move COMPARE_TYPES usage
Change-Id: I87d88618b6f86c1f9618ba9cea132153a8ef2fa5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
4ae2d1be29 igzip: Implement optimized level 2 compression
Change-Id: I8cf5bcd56f290d17205ac36dc2828c8acfc66947
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Greg Tucker
bda088b31a igzip: Fix MS incorrect reg compare for igzip_update_histogram
Early exit case for zero length update would compare the wrong register in
windows.  Could cause improper null exit.

Change-Id: I77539556463813a783d8d351df5a20c99299d100
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-06 10:06:28 -07:00
Roy Oursler
88f95d8594 igzip: Merge inflate.h and igzip_lib.h and fix external naming
Merge inflate.h and igzip_lib.h and rename many defines to avoid conflicts,
along with general cleanup of the new header.

Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 16:40:43 -07:00
Roy Oursler
ee2e2bce4f igzip: Improving igzip_update_histogram
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 16:31:23 -07:00
Roy Oursler
d06e14b937 igzip: Port update_histogram and decode_huffman_code_block to windows
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 16:17:54 -07:00
Roy Oursler
b25ef61a57 igzip: Fix warning for igzip_update_histogram when compiled with LARGE_WINDOW.
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 16:15:51 -07:00
Roy Oursler
17dac9f641 igzip: Implement xmm loads to preload data in update_histogram
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 11:07:28 -07:00
Roy Oursler
4d40cd360d igzip: Speed up hash table initialization in igzip_update_histogram.
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 11:02:23 -07:00
Roy Oursler
af9c0c0f46 igzip: update update_hash to match stateless and stateful compression.
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-05 11:01:01 -07:00
Roy Oursler
cf30138c7b igzip: Load memory into xmm in stateless registers
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-02 17:22:52 -07:00
Roy Oursler
4d1fe78bfa igzip: Modify stateless hash updating to match the length 4 short match
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-02 17:19:15 -07:00
Roy Oursler
31814483c0 igzip: Create assembly version of isal_update_histogram
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>
2016-12-02 17:16:55 -07:00