Displaying 17 results from an estimated 17 matches for "__pic__".
2009 Aug 11
6
[LLVMdev] Build issues on Solaris
Hi all,
I've encountered a couple of minor build issues on Solaris that
have crept in since 2.5, fixes below:
1. In lib/Target/X86/X86JITInfo.cpp, there is:
// Check if building with -fPIC
#if defined(__PIC__) && __PIC__ && defined(__linux__)
#define ASMCALLSUFFIX "@PLT"
#else
#define ASMCALLSUFFIX
#endif
Which causes a link failure due to the non-PLT relocation that
results. I'm not sure if this should be
#if defined(__PIC__) && __PIC__ && (defined(__lin...
2009 Aug 18
0
[LLVMdev] Build issues on Solaris
Hello, Nathan
> or if it should be a configure test, which might be safer. Are there
> any x86 platforms (other than apple) that don't need PLT-indirect calls?
Yes, mingw. However just tweaking the define is not enough - we're not
loading address of GOT into ebx before the call (on 32 bit ABIs) thus
the call will be to nowhere.
--
With best regards, Anton Korobeynikov
Faculty of
2009 Aug 25
2
[LLVMdev] Build issues on Solaris
...uot;
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Config/config.h"
#include <cstdlib>
#include <cstring>
using namespace llvm;
@@ -52,7 +53,7 @@
#define ASMPREFIX GETASMPREFIX(__USER_LABEL_PREFIX__)
// Check if building with -fPIC
-#if defined(__PIC__) && __PIC__ && defined(__linux__)
+#if defined(__PIC__) && __PIC__ && defined(NEED_PLT_CALL)
#define ASMCALLSUFFIX "@PLT"
#else
#define ASMCALLSUFFIX
Index: autoconf/configure.ac
===================================================================
---...
2009 Aug 18
0
[LLVMdev] Build issues on Solaris
...than Keynes <Nathan.Keynes at sun.com>:
> Hi all,
>
> I've encountered a couple of minor build issues on Solaris that
> have crept in since 2.5, fixes below:
>
> 1. In lib/Target/X86/X86JITInfo.cpp, there is:
>
> // Check if building with -fPIC
> #if defined(__PIC__) && __PIC__ && defined(__linux__)
> #define ASMCALLSUFFIX "@PLT"
> #else
> #define ASMCALLSUFFIX
> #endif
>
> Which causes a link failure due to the non-PLT relocation that
> results. I'm not sure if this should be
> #if defined(__PIC__) &&a...
2012 Oct 03
1
[LLVMdev] Clang predefined macros with -fPIC and -fPIE
Hello everyone,
Clang seems to only define __PIE__ when both –fPIC and –fPIE is used in the command line whereas gcc defines both __PIC__ and __PIE__. Is this intended or a bug in clang? Thanks.
Command line:
clang -fPIC -fPIE -dM -E - < /dev/null | grep __PI
--
Tareq
2017 Dec 30
0
[PATCH] Fix sparc assembly when compiled as PIC
...deletions(-)
diff --git a/usr/include/arch/sparc/machine/asm.h b/usr/include/arch/sparc/machine/asm.h
index 04fe9b1b..fd9ef1ef 100644
--- a/usr/include/arch/sparc/machine/asm.h
+++ b/usr/include/arch/sparc/machine/asm.h
@@ -61,7 +61,7 @@
#endif
#define _ASM_LABEL(name) name
-#ifdef PIC
+#ifdef __PIC__
/*
* PIC_PROLOGUE() is akin to the compiler generated function prologue for
* PIC code. It leaves the address of the Global Offset Table in DEST,
@@ -83,12 +83,20 @@
0: \
add dest,%o7,dest; \
mov tmp, %o7
+#define SET(var,base,dest) \
+ sethi %gdop_hix22(var), dest; \
+ xor dest, %gdop_lo...
2019 Jan 18
0
[klibc:master] Fix sparc assembly when compiled as PIC
...4 deletions(-)
diff --git a/usr/include/arch/sparc/machine/asm.h b/usr/include/arch/sparc/machine/asm.h
index 04fe9b1..fd9ef1e 100644
--- a/usr/include/arch/sparc/machine/asm.h
+++ b/usr/include/arch/sparc/machine/asm.h
@@ -61,7 +61,7 @@
#endif
#define _ASM_LABEL(name) name
-#ifdef PIC
+#ifdef __PIC__
/*
* PIC_PROLOGUE() is akin to the compiler generated function prologue for
* PIC code. It leaves the address of the Global Offset Table in DEST,
@@ -83,12 +83,20 @@
0: \
add dest,%o7,dest; \
mov tmp, %o7
+#define SET(var,base,dest) \
+ sethi %gdop_hix22(var), dest; \
+ xor dest, %gdop_lo...
2017 Dec 30
6
building debug version of klibc
Hello!
Can someone please help me in building debug version of klibc ?
I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
failed to build it with debug info
added "-g" to HOSTCFLAGS in Makefile, but
$ make -j KLIBCKERNELSRC=`pwd`/../linux-2.6/usr
still strips every debug symbol , and i'm failed to change
scripts/Kbuild.klibc and Makefile to remove strip
2015 Mar 13
1
[RFC PATCH v3] Intrinsics/RTCD related fixes. Mostly x86.
...id cpuid(unsigned int CPUInfo[4], unsigned int InfoType)
+{
+ __cpuid((int*)CPUInfo, InfoType);
+}
+
#else
#if defined(CPU_INFO_BY_C)
@@ -48,14 +57,28 @@
static void cpuid(unsigned int CPUInfo[4], unsigned int InfoType)
{
#if defined(CPU_INFO_BY_ASM)
+#if defined(__i386__) && defined(__PIC__)
+/* %ebx is PIC register in 32-bit, so mustn't clobber it. */
+ __asm__ __volatile__ (
+ "xchg %%ebx, %1\n"
+ "cpuid\n"
+ "xchg %%ebx, %1\n":
+ "=a" (CPUInfo[0]),
+ "=r" (CPUInfo[1]),
+ "=c" (...
2015 Mar 12
1
[RFC PATCHv2] Intrinsics/RTCD related fixes. Mostly x86.
...id cpuid(unsigned int CPUInfo[4], unsigned int InfoType)
+{
+ __cpuid((int*)CPUInfo, InfoType);
+}
+
#else
#if defined(CPU_INFO_BY_C)
@@ -48,14 +57,28 @@
static void cpuid(unsigned int CPUInfo[4], unsigned int InfoType)
{
#if defined(CPU_INFO_BY_ASM)
+#if defined(__i386__) && defined(__PIC__)
+/* %ebx is PIC register in 32-bit, so mustn't clobber it. */
+ __asm__ __volatile__ (
+ "xchg %%ebx, %1\n"
+ "cpuid\n"
+ "xchg %%ebx, %1\n":
+ "=a" (CPUInfo[0]),
+ "=r" (CPUInfo[1]),
+ "=c" (...
2015 Mar 02
13
Patch cleaning up Opus x86 intrinsics configury
The attached patch cleans up Opus's x86 intrinsics configury.
It:
* Makes ?enable-intrinsics work with clang and other non-GCC compilers
* Enables RTCD for the floating-point-mode SSE code in Celt.
* Disables use of RTCD in cases where the compiler targets an instruction set by default.
* Enables the SSE4.1 Silk optimizations that apply to the common parts of Silk when Opus is built in
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...(pthread_attr_getstacksize)
+__DECLARE_WRAPPER(pthread_attr_getguardsize)
+__DECLARE_WRAPPER(pthread_key_create)
+__DECLARE_WRAPPER(pthread_setspecific)
+
+// The unsafe stack pointer is stored in the TCB structure on these platforms
+#if defined(__i386__)
+# define MOVPTR "movl"
+# ifdef __pic__
+# define IMM_MODE "nr"
+# else
+# define IMM_MODE "ir"
+# endif
+#elif defined(__x86_64__)
+# define MOVPTR "movq"
+# define IMM_MODE "nr"
+#endif
+
+#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+
+# define __THREAD_GETMEM_L...
2015 Mar 18
5
[RFC PATCH v1 0/4] Enable aarch64 intrinsics/Ne10
Hi All,
Since I continue to base my work on top of Jonathan's patch,
and my previous Ne10 fft/ifft/mdct_forward/backward patches,
I thought it would be better to just post all new patches
as a patch series. Please let me know if anyone disagrees
with this approach.
You can see wip branch of all latest patches at
https://git.linaro.org/people/viswanath.puttagunta/opus.git
Branch:
2015 Mar 31
6
[RFC PATCH v1 0/5] aarch64: celt_pitch_xcorr: Fixed point series
Hi Timothy,
As I mentioned earlier [1], I now fixed compile issues
with fixed point and resubmitting the patch.
I also have new patch that does intrinsics optimizations
for celt_pitch_xcorr targetting aarch64.
You can find my latest work-in-progress branch at [2]
For reference, you can use the Ne10 pre-built libraries
at [3]
Note that I am working with Phil at ARM to get my patch at [4]
2015 May 08
8
[RFC PATCH v2]: Ne10 fft fixed and previous 0/8]
Hi All,
As per Timothy's suggestion, disabling mdct_forward
for fixed point. Only effects
armv7,armv8: Extend fixed fft NE10 optimizations to mdct
Rest of patches are same as in [1]
For reference, latest wip code for opus is at [2]
Still working with NE10 team at ARM to get corner cases of
mdct_forward. Will update with another patch
when issue in NE10 gets fixed.
Regards,
Vish
[1]:
2015 May 15
11
[RFC V3 0/8] Ne10 fft fixed and previous
Hi All,
Changes from RFC v2 [1]
armv7,armv8: Extend fixed fft NE10 optimizations to mdct
- Overflow issue fixed by Phil at ARM. Ne10 wip at [2]. Should be upstream soon.
- So, re-enabled using fixed fft for mdct_forward which was disabled in RFCv2
armv7,armv8: Optimize fixed point fft using NE10 library
- Thanks to Jonathan Lennox, fixed some build fixes on iOS and some copy-paste errors
Rest
2015 Apr 28
10
[RFC PATCH v1 0/8] Ne10 fft fixed and previous
Hello Timothy / Jean-Marc / opus-dev,
This patch series is follow up on work I posted on [1].
In addition to what was posted on [1], this patch series mainly
integrates Fixed point FFT implementations in NE10 library into opus.
You can view my opus wip code at [2].
Note that while I found some issues both with the NE10 library(fixed fft)
and with Linaro toolchain (armv8 intrinsics), the work