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
-1
votes
1 answer

Position Dependent, Independent Code, and Global Variables in PowerPC Assembly

I'm relatively new to assembly and am working with a powerpc chip. I'm using a gcc crosscompiler and working with a buildroot environment (just for background). I am adding code to the .head section of some code that will create a .elf object (lets…
Tyler
  • 17
  • 8
-1
votes
1 answer

What do the PowerPC instructions mtctr and dcbst mean?

Can someone please explain to me what the instructions mtctr and dcbst mean Because i have been trying to reverse this mtctr r4 and dcbst r0, r3 Please Help.
user3885393
  • 41
  • 2
  • 9
-1
votes
1 answer

I need to reverse this PPC Line: clrldi r11, r31, 32

I need to reverse this PPC Line: clrldi r11, r31, 32 I know clrldi it means Clear Left Word Double Immediate. But I dont know how to reverse it so can someone give me advise on reversing it. :)
user3885393
  • 41
  • 2
  • 9
-1
votes
1 answer

PowerPC Assembly & ~31 meaning?

I work on a MPC8347 PowerPC. In u-boot-v2014.01, I have this instruction in start.S: li r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \ (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32 What is the meaning of & ~31 and & 31? Are there masks on 32…
m-ric
  • 5,621
  • 7
  • 38
  • 51
-1
votes
1 answer

Why these function in powerpc assembly stack usage different?

I have 4 sample function: void test_func1(void) { return; } void test_func2(int a) { return; } int test_func3(void) { return 0; } void test_func4(void) { int a; a = a + 1; return; } I compiled them with…
-1
votes
1 answer

powerpc-gcc compiles long long datatype variables into floating registers

i have problem in compiling a C code for MPC5643L powerpc board. the code has long long x variable and gcc assembles it as a floating number. since my registers are 64 bit how to compile for it using gcc.
risaldar
  • 71
  • 1
  • 2
  • 10
-1
votes
2 answers

which c code will gets changed to rlwinm power PC assembly instruciton

which c code will gets changed to rlwinm power PC assembly instruciton?? This is the snapshot of objdump.. if(!pool || pool->maxPoolSize > SEQ_MODULUS ) /* Invalid mask or pointer is null */ 29ccc: 41 82 00 dc beq- 29da8…
user2185454
  • 27
  • 1
  • 1
  • 5
-1
votes
2 answers

Array of structures for PowerPC Compiler

I have a problem, I was asked to declare an array of structures, with one structure inside like so: typedef struct { int a; int b; int c; }blah; int main() { blah arr[1] = {{0, 0, 0}}; //... } Is the above initialization correct?
xBACP
  • 531
  • 1
  • 3
  • 17
-2
votes
1 answer

Why does powerpc need this additional fluff to make a raw machine code function work?

I'm working on a simple JIT compiler for PowerPC, I followed the examples in https://github.com/spencertipping/jit-tutorial to get a hang of how to work with it. The problem is that the identity function in the second example "jitproto.c" can't…
nioroso
  • 65
  • 8
-2
votes
1 answer

Where/how can I find out exactly what this assembly code does for the purpose of converting it to C++?

I want to convert the following code to C++. .globl _start _start: .set DLLLoaderHook, 0x823326A8 .set LoadLibraryA, 0x82332B10 .set DLLLoaderString, 0x82000870 .long DLLLoaderString .long (9f-0f)/4 0: .string "game:\\Tesseract.dll" …
-2
votes
1 answer

How do you pause a thread?

Hello i'm trying to pause a thread, but for some reason it keeps crashing the game. here is what i got void Test(){ SuspendThread((PVOID)0x83593C24);//0x83593C24 The offset from the game Scr_AddInt(1); …
HorseFrog
  • 11
  • 1
-2
votes
1 answer

How do I reserve RAM on a PowerPC CPU running Linux?

I am trying to reserve 10MB out of the 2GB onboard RAM on an embedded single-board computer that uses the Canyonlands (PowerPC-460EX) CPU. By reserve RAM, I mean block out a chunk of RAM that Linux will not touch so it will retain data on a…
shansen
  • 317
  • 1
  • 2
  • 12
-3
votes
1 answer

How to determine offset values when disassembly?

long long int i=57745158985; #the C code 0000000000100004: li r7,13 0000000000100008: lis r8,29153 000000000010000c: ori r8,r8,0x3349 0000000000100010: stw r7,24(rsp) 0000000000100014: stw r8,28(rsp) 0000000000100018: lfd…
umt
  • 7
  • 2
-3
votes
1 answer

Benchmarking microcontrollers

currently I am working on setting up benchmark between microcontrollers (based on Powerpc). So I would like to know, if anyone can provide me some documentation showing in detail, what factors are most important to be considered for benchmarking?…
waq
  • 15
  • 6
-5
votes
1 answer

Assembler generates negative forms of conditions, not positive one

I wondered why gcc assembler use negative form of conditions instead of positive one. Suppose that we have following C code: if (x == 10) { x ++; } y ++; When I use gcc to compile and produce object file, the result of assembly code in PowerPC…
Hossein Mobasher
  • 4,382
  • 5
  • 46
  • 73
1 2 3
46
47