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
14
votes
17 answers

How can dereferencing a NULL pointer in C not crash a program?

I need help of a real C guru to analyze a crash in my code. Not for fixing the crash; I can easily fix it, but before doing so I'd like to understand how this crash is even possible, as it seems totally impossible to me. This crash only happens on a…
Mecki
  • 125,244
  • 33
  • 244
  • 253
13
votes
4 answers

creating a C function with a given size in the text segment

I'm programming an embedded powerpc 32 system with a 32 kbyte 8-way set associative L2 instruction cache. To avoid cache thrashing we align functions in a way such that the text of a set of functions called at a high frequency (think interrupt code)…
Jens
  • 69,818
  • 15
  • 125
  • 179
13
votes
3 answers

gcc attributes with C++ methods

In GCC with a C++ method defined in a header file, is it possible to use the attribute syntax? Can someone provide an example for me please. The following code does not work: class foo { public: void my_func() __attribute__((hot)); …
ShaneCook
  • 315
  • 1
  • 2
  • 13
13
votes
2 answers

How can I ask Mac OS to allocate memory in a specific address range?

I am writing a Mac OS 9 "compatibility layer" for Mac OS X because I was struck with nostalgia recently, and because all current solutions require you to run Classic inside a virtual machine that doesn't support everything it should to run the stuff…
zneak
  • 134,922
  • 42
  • 253
  • 328
12
votes
8 answers

Emulating variable bit-shift using only constant shifts?

I'm trying to find a way to perform an indirect shift-left/right operation without actually using the variable shift op or any branches. The particular PowerPC processor I'm working on has the quirk that a shift-by-constant-immediate, like int…
Crashworks
  • 40,496
  • 12
  • 101
  • 170
12
votes
1 answer

ldd shows varied addresses on x86 Linux

I am using ldd to show the dynamic library on Fedora/x86, and it shows different results each time it is used. Is that expected? Or is there an explanation? I remember it shows a fixed result on PPC/Linux. `ldd /bin/ls linux-gate.so.1 => …
tristan
  • 4,235
  • 2
  • 21
  • 45
12
votes
2 answers

PowerPC Assembly Load Immediate

I am new to PowerPC assembly. I am working with an MPC8245 (yes, old school). This is a 603e family processor. I would like to know how to create a load immediate instruction where the immediate 16-bit value is 'unsigned'. Example: li r3,0xFC10 The…
KeithSmith
  • 774
  • 2
  • 8
  • 26
11
votes
1 answer

How to disable easy_install or pip building ppc by default on Snow Leopard 10.6.6?

Since I have Xcode 4 installed and it seems xcode 4 can't build ppc binaries anymore, quite a lot of python packages(especially mercurial pymongo, etc.) can't build and complained that there is no "as" installed for ppc architecture. Is there any…
Bo Xiao
  • 173
  • 1
  • 7
11
votes
2 answers

Complex numbers passed by-value from C++ to C does not seem to work on powerpc

When I'm passing a complex float(complex.h) from a c++ caller to a c library, the value does not pass correctly when running on a 32 bit power pc. I was using two different open source software libraries when I detected this problem. I've isolated…
dan
  • 119
  • 5
10
votes
2 answers

How do i remove the ppc section in growl framework?

Now i add growl notification support into my app ,when i submitted it to mac app store with organizer,it says that " Unsupported Architecture - Application executables may support either or both of the Intel architectures: i386 (32-bit) x86_64…
NeXT5tep
  • 861
  • 1
  • 11
  • 23
10
votes
2 answers

What is the purpose of the PowerPC instruction `bcctr`?

I'm new to the PowerPC architecture and I'm looking at some disassembled code with the bcctr instruction. Although the manual specifies how the bcctr instruction works, it doesn't explain what it typically would be used for. Can you come up with…
John Källén
  • 7,551
  • 31
  • 64
9
votes
3 answers

PowerPC emulation: Qemu, PearPC, or... ?

I'm currently trying to build a configuration to test some code on Big-Endian systems. Through chats and research, i've been convinced that a good target for these tests would be the PowerPC architecture. Since i don't own one, and don't expect to…
Cyan
  • 13,248
  • 8
  • 43
  • 78
9
votes
2 answers

default baud rate - linux/u-boot

I'm working on the development of an embedded linux system using u-boot. U-boot sets the baud rate of the ttyS0 serial port with the console= bootarg, but I would also like to set the default baud rate of ttyS[1-3] (to something other than 9600). In…
dan6470
  • 309
  • 2
  • 4
  • 9
9
votes
5 answers

Cheap PowerPC Evaluation Board?

I've been trying to learn embedded software development for some time (been doing software for almost 15 years, 10 in Java, plus good knowledge of C/C++/X86 Asm from College.) Started playing with a PIC-based evaluation board just for kicks. Where I…
luis.espinal
  • 10,331
  • 6
  • 39
  • 55
9
votes
3 answers

Which gcc options reduce code size?

I'm constrained by a 128Kb limit executable size for an embedded PowerPC system. Unfortunately, using option -Os to optimize for size does not work due to what I believe is a compiler bug (link with -Os fails due to undefined reference to…
Jens
  • 69,818
  • 15
  • 125
  • 179
1
2
3
46 47