powerpc

How to do a runtime check for power7 or greater on LinuxPPC?

左心房为你撑大大i 提交于 2019-12-11 07:54:50
问题 I can check for power7+ on AIX with something like: inline bool ossPower7orLater( ) { #if defined _AIX if ( !__power_set( POWER_6 | POWER_5 | POWER_4 ) ) { return true ; } else #endif return false ; } using macros from systemcfg.h. Here the __power_set() macro is used instead of __power_7() to avoid coding a check for power7 that will break when power8 comes out. How would this be extended to include support for LinuxPPC too? I could imagine there's probably some instruction that could be

Building for PowerPC 405 machine running Linux 2.4.18 with a Mac G4 running 2.4.27

折月煮酒 提交于 2019-12-11 04:27:56
问题 I presently run Linux 2.4.27 (Debian Sarge) on a PowerPC Mac G4 machine. I need to write software for Linux 2.4.18 running on a PowerPC 405 machine, and the binaries I am producing on my Mac G4 running 2.4.27 with both GCC 3.3.5 and GCC 2.95.3 (I have both installed) are having problems; I have built a static version of cURL with both compilers that segfaults when run on this 2.4.18 PowerPC 405 machine. I have noticed that binaries built on a 2.4.18 kernel with a cross compiler work (x86->PPC

32 bit PPC rlwinm instruction

我是研究僧i 提交于 2019-12-11 02:36:20
问题 I'm having a bit of trouble understanding the rlwinm PPC Assembly instruction (Rotate Left Word Immediate Then AND with Mask). I am trying to reverse this part of a function rlwinm r3, r3, 0, 28, 28 I already know what r3 is. r3 in this case is a 4 byte integer but I am not sure exactly what this instruction rlwinm is doing to it. By the way, this is on a 32 bit machine. 回答1: Your understanding is not quite right. As per the IBM link on this instruction, the form you're seeing is: rlwinm

Error unsupported relocate against assembly system call

江枫思渺然 提交于 2019-12-11 00:00:15
问题 I am trying to cross compile glibc-2.18 for powerpc freescale evaluation board. At one of the stages in the build I get following error: glibc Failed: ../sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Assembler messages: ../sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S:40: Error: unsupported relocation against swapcontext make[3]: *** [/home/user/Desktop/SmoothWall/bcutm/distrib/build/sources/glibc/glibc-2.18-compile/stdlib/setcontext.o] Error 1 make[3]: Leaving directory

Detect Power8 in-core crypto through getauxval?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 19:39:34
问题 I'm on GCC112, which is a little-endian Power8 machine running Linux. Power8 has in-core crypto providing AES, SHA and a few other useful features. I'm trying to determine the availability of the features at runtime using getauxval . The use case is distros building for a "minimum" capable machine, and we need to swap-in a faster function at runtime. The dump of hwcaps.h is shown below, but it lacks specific bits for Power8, AES, SHA and others. However, I believe Power8 is ISA 2.07, and ISA

Cross Compile Boost library for PowerPC architecture

大城市里の小女人 提交于 2019-12-10 11:55:13
问题 I am trying to cross compile Boost library (Thread, System) for PowerPC architecture. I followed the below steps but facing problems. I run a shell script which sets up my toolchain. The compiler ppc_4xx-g++ is visible at the shell. Steps followed: Add the line "using gcc : power : ppc_4xx-g++ ;" to the file user-config.jam Run ./bootstrap.sh --prefix=BoostPowerPC in root directory. Run ./b2 install --build-dir=BoostPowerPC toolset=gcc-power --with-thread --with-system stage Result: All the

How the assembly file is generated from the perl script in OpenSSL

∥☆過路亽.° 提交于 2019-12-10 09:45:50
问题 In the opensource code of OpenSSL(version 1.1.0e) I saw that some of the function definition is generated by the perl files present inside the folders. In the build.info file present in each folders inside the crypto, they have written some lines to generate the .s from the corresponding .pl. For example, for generating aes_p8_set_encrypt_key in crypto/aes/build.info : GENERATE[aesp8-ppc.s]=asm/aesp8-ppc.pl $(PERLASM_SCHEME) for generating OPENSSL_madd300_probe in crypto/build.info : GENERATE

How to properly develop for the iPhone on a PowerPC Mac?

为君一笑 提交于 2019-12-10 09:35:00
问题 I'm doing iPhone development on a PowerPC Mac. How do I get code signing to work properly so that I can build to my iPhone? The iPhone SDK doesn't officially support PowerPC, but with some fidgeting, it can be installed. See here. I've got the SDK installed and running fine in Xcode and the iPhone simulator works fine. However, I can't build to my iPhone in Xcode -- the code signing is fubar. Some clever people have created workarounds here. Namely, I used the codesign script that Tiku posted

Xcode4 with Mac OS X 10.4 SDK

烂漫一生 提交于 2019-12-10 04:59:35
问题 In the latest iteration of Xcode, Xcode 4.0, the 10.4 SDK is no longer included. However, I still need to support 10.4 and PowerPC builds. I have installed latest Xcode 3.2.6 which still includes 10.4 support. Then I installed Xcode4. Has anyone found a simple way to "cheat" and get Xcode4 to use 3.2.6's SDKs? 回答1: Yes, I did :) See here. 回答2: XCode 4.0 supports deploying to Mac OS X 10.4 right out of the box, so you shouldn't have to do anything special. For example, I created a project then

C++ thread not stopping in gdb async mode using user-defined or python command sequence

别等时光非礼了梦想. 提交于 2019-12-09 11:52:24
问题 I'm using gdb 7.4.1 on embedded powerpc target to perform some analysis on my multi-threaded C++ program that uses pthreads. My end goal is to script gdb with python to automate some common analysis functions. The problem is that I am finding some discrepancy in behavior when I run commands individually vs. in a gdb user-defined command (or invoking the same commands via python script). edit: I found this reference to a very similar problem on the main gdb mailing list. Although I don't