Questions tagged [powerpc]

Questions related to the PowerPC family of RISC processors.

PowerPC is a RISC architecture created jointly by Apple, IBM, and Freescale (formerly Motorola). The PowerPC standard is now handled by Power.org. It includes both 32 and 64 bit versions of the processor.

Helpful Links:

See Also:

705 questions
8
votes
3 answers

Equivalent of x86 PAUSE instruction for PPC

Does there exist an equivalent of the x86 PAUSE instruction, which is placed within busy waiting loops to improve performance, particularly on SMT machines, on PowerPC?
Jimmeh
  • 1,011
  • 9
  • 14
8
votes
1 answer

Unable to link ppc after upgrading to XCode 4

I followed these instructions on how to get the 10.4 SDK working with PPC after upgrading to XCode 4. I am able to compile, but it errors out at link time. As an added wrinkle, I'm not using XCode per se, but the gcc toolchain that comes with it. …
paleozogt
  • 6,393
  • 11
  • 51
  • 94
8
votes
2 answers

GCC PowerPC avoiding .rodata section for floats

I'm writing C code and compile it for the PowerPC architecture. That said C code contains floating point variable constants which I want to be placed in the .text section instead of .rodata so the function code is self-contained. The problem with…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
8
votes
6 answers

What does the C compiler do with bitfields?

I'm working on an embedded project (PowerPC target, Freescale Metrowerks Codewarrior compiler) where the registers are memory-mapped and defined in nice bitfields to make twiddling the individual bit flags easy. At the moment, we are using this…
Adam Shiemke
  • 3,734
  • 2
  • 22
  • 23
8
votes
2 answers

Spidev do not write/read simultaneously using ioctl

I hope to find some help even if this issue might be more hardware than software related (we'll see). I'm working on a custom board based on Freescales P1021 processor (ppc, e500v2 core). A external PCB will be connected and could be configured by…
stede
  • 355
  • 2
  • 4
  • 9
8
votes
2 answers

Printing floats. (Powerpc)

I am trying to print floats. Although variadic functions does not work with floats so they are promoted to double. I can manage to get rid of the warning by casting it to a double. While printing the results on some powerpc architecture, it gives…
ededdy
  • 81
  • 3
7
votes
0 answers

How do I get an instruction trace on Mac OS X 10.5 PPC?

Apple used to ship a tool called amber as part of CHUD with Xcode 2.5, which would allow you to get an instruction trace for a process. You could then feed the instruction trace to simg5. The simg5 tool shipped with Xcode 3 but without amber,…
Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
7
votes
4 answers

What's the equivalent of rdtsc opcode for PPC?

I have an assembly program that has the following code. This code compiles fine for a intel processor. But, when I use a PPC (cross)compiler, I get an error that the opcode is not recognized. I am trying to find if there is an equivalent opcode for…
Rob
  • 71
  • 2
7
votes
2 answers

How to compile Hello World program for PowerPC

I have a Dreambox 500 which on Wikipedia says has a PCP processor which is PowerPC: $ cat /proc/cpuinfo processor: 0 cpu: STBx25xx clock: 252MHz Review: 9.80 (pvr 5151 0950) bogomips: 250.36 Machine: Dream Multimedia Dreambox TV plb bus clock:…
Iamk Denok
  • 163
  • 1
  • 5
  • 13
7
votes
2 answers

How to debug the Linux kernel with QEMU and KGDB?

I have been able to boot a powerpc based system (MPC8544DS to be specific) using the following way to invoke qemu (v1.7.0) qemu-system-ppc -M mpc8544ds -m 512 -kernel zImage -s -nographic -initrd busyboxfs.img -append "root=/dev/ram rdinit=/bin/sh…
AjB
  • 890
  • 13
  • 34
7
votes
1 answer

gcc inline assembler implicit function declaration on Powerpc arch

I'm trying to compile code which is calling multiple times the following makro: #define MULADD(i, j) \ asm( \ " mullw 16,%6,%7 \n\t" \ " addc %0,%0,16 \n\t" \ " mulhwu 16,%6,%7 \n\t" \ " adde %1,%1,16 …
dhein
  • 6,431
  • 4
  • 42
  • 74
7
votes
1 answer

Lua behaves weird on PowerPC/LynxOS platform, why?

I choose Lua 5.1 as my application's embedded scripting language, but when I port the application to a legacy platform runs LynxOS on PowerPC, thing seems going wrong. I get following code run up on PC and every thing looks good: void test_lua() { …
Haiyuan Li
  • 377
  • 2
  • 10
7
votes
9 answers

Which 32-bit/64-bit CPU architecture has the easiest instruction set?

I feel extremely comfortable dealing with 32-bit PowerPC assembly code, but I am completely lost when trying to make sense of x86 code. Do any of the other common architectures like ARM, MIPS, Sparc etc have an easier than x86 instruction set?
sigjuice
  • 28,661
  • 12
  • 68
  • 93
7
votes
1 answer

What is a NULL in hexadecimal

I have to debug a C application in assembler. I want to know if a register is containing a NULL . I need for that the hex value of that. Note: I use a PPC
user1829804
  • 127
  • 1
  • 1
  • 9
7
votes
1 answer

How to use decimal floating point in Gnu C++ (g++)?

GCC 4.5 added support for decimal floating points in the runtime library (http://gcc.gnu.org/gcc-4.5/changes.html). I'm able to compile code including , using namespace std::decimal, then using decimal64 and so on in the code. Unfortunately, I'm…
user1034081
  • 618
  • 5
  • 21
1 2
3
46 47