common: remove useless x86_intrin.h

Yeah one less licence in the project :)
This commit is contained in:
Gregory Hainaut 2016-07-22 18:47:51 +02:00
parent 7d35e15fea
commit 5cf2688c0c
5 changed files with 1 additions and 99 deletions

View File

@ -122,7 +122,6 @@
<ClInclude Include="..\..\include\Utilities\FixedPointTypes.h" />
<ClInclude Include="..\..\include\Utilities\General.h" />
<ClInclude Include="..\..\include\Utilities\HashMap.h" />
<ClInclude Include="..\..\include\intrin_x86.h" />
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h" />
<ClInclude Include="..\..\include\Utilities\MathUtils.h" />
<ClInclude Include="..\..\include\Utilities\MemcpyFast.h" />

View File

@ -165,9 +165,6 @@
<ClInclude Include="..\..\include\Utilities\HashMap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\intrin_x86.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\Utilities\lnx_memzero.h">
<Filter>Header Files</Filter>
</ClInclude>

View File

@ -1,69 +0,0 @@
/*
Compatibility <intrin_x86.h> header for GCC -- GCC equivalents of intrinsic
Microsoft Visual C++ functions. Originally developed for the ReactOS
(<http://www.reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
projects.
Copyright (c) 2006 KJK::Hyperion <hackbunny@reactos.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#pragma once
/*
NOTE: this is a *compatibility* header. Some functions may look wrong at
first, but they're only "as wrong" as they would be on Visual C++. Our
priority is compatibility
NOTE: unlike most people who write inline asm for GCC, I didn't pull the
constraints and the uses of __volatile__ out of my... hat. Do not touch
them. I hate cargo cult programming
NOTE: review all intrinsics with a return value, add/remove __volatile__
where necessary. If an intrinsic whose value is ignored generates a no-op
under Visual C++, __volatile__ must be omitted; if it always generates code
(for example, if it has side effects), __volatile__ must be specified. GCC
will only optimize out non-volatile asm blocks with outputs, so input-only
blocks are safe. Oddities such as the non-volatile 'rdmsr' are intentional
and follow Visual C++ behavior
NOTE: GCC and Clang both support __sync_* built-ins for barriers and
atomic operations.
Pay attention to the type of barrier. Make it match with what Visual C++
would use in the same case
*/
/*** Atomic operations ***/
static __inline__ __attribute__((always_inline)) s32 _InterlockedExchange(volatile s32 * const Target, const s32 Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}
static __inline__ __attribute__((always_inline)) s64 _InterlockedExchange64(volatile s64 * const Target, const s64 Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}

View File

@ -20,10 +20,8 @@
// Yes there are several files for the same features!
// x86intrin.h which is the general include provided by the compiler
// intrin_x86.h which is a compatibility layer (as this file) but with a BSD license
// x86_intrin.h, this file, which is another compatibility layer
// x86_intrin.h, this file, which is compatibility layer for severals intrinsics
#include "x86intrin.h"
#include "intrin_x86.h"
#else

View File

@ -24,10 +24,6 @@ Files: plugins/zzogl-pg/opengl/glprocs.*
Copyright: 1991-2000 Silicon Graphics, Inc
License: SGI FREE SOFTWARE LICENSE B 2.0
Files: common/include/intrin_x86.h
Copyright: 2006 KJK::Hyperion <hackbunny@reactos.com>
License: Expat
Files: common/src/Utilities/vssprintf.cpp
Copyright: 2002 Michael Ringgaard
License: BSD-3-Clause
@ -111,25 +107,6 @@ License: SGI FREE SOFTWARE LICENSE B 2.0
dealings in this Software without prior written authorization from Silicon
Graphics, Inc.
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: