powerpc

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

大城市里の小女人 提交于 2019-12-05 13:28:45
问题 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) ends up in separate cache sets. We do this by inserting dummy functions as needed, e.g. void high_freq1(void) { ... } void dummy(void) { __asm__(/* Silly opcodes to fill ~100 to ~1000 bytes of text segment */); } void high_freq2(void) { ... } This

Xcode4 with Mac OS X 10.4 SDK

こ雲淡風輕ζ 提交于 2019-12-05 11:27:45
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? Mecki Yes, I did :) See here . 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 selected the project and right there, there is a field called "Deployment Target" where you can select 10

What does “vperm v0,v0,v0,v17” with unused v0 do?

主宰稳场 提交于 2019-12-05 11:17:42
I'm working on an SHA-256 implementation using Power8 built-ins . The performance is off a bit. I estimate it is off by about 2 cycles per byte (cpb). The C/C++ code to perform SHA on a block looks like so: // Schedule 64-byte message SHA256_SCHEDULE(W, data); uint32x4_p8 a = abcd, e = efgh; uint32x4_p8 b = VectorShiftLeft<4>(a); uint32x4_p8 f = VectorShiftLeft<4>(e); uint32x4_p8 c = VectorShiftLeft<4>(b); uint32x4_p8 g = VectorShiftLeft<4>(f); uint32x4_p8 d = VectorShiftLeft<4>(c); uint32x4_p8 h = VectorShiftLeft<4>(g); for (unsigned int i=0; i<64; i+=4) { const uint32x4_p8 k =

Is it possible to run Nodejs on powerpc based Linux?

若如初见. 提交于 2019-12-05 09:22:32
I tried to build the latest Linux 64bit stable version with ./configure make and make install but ended up with this error: ../deps/openssl/openssl/include/openssl/../../crypto/bn/bn.h:803:23: error: unknown type name ‘BN_ULONG’ So is it actually possible to develop nodejs apps on Debian ppc? My setup is iMac G5 PowerPC with Debian Wheezy PPC on it. Andrew Low from IBM has developed a PowerPC port of node.js: https://github.com/andrewlow/node as well as V8: https://github.com/andrewlow/v8ppc 来源: https://stackoverflow.com/questions/18519899/is-it-possible-to-run-nodejs-on-powerpc-based-linux

Overview/reference manual for Open Firmware Device Trees

匆匆过客 提交于 2019-12-05 06:56:10
I am trying to setup a driver for an embedded PowerPC board, and the correct way to do this today is to use the OpenFirmware Device Tree datastructure (the .dtb file, compiled from a .dts file). Creating a tree is pretty easy, but how do I get my device driver to find its node and the data in it? I have not managed to find any good reference on this, and books like "Linux Device Drivers" are too much into x86 land to be of much help for device trees that mostly pertain to Power Architecture-based machines (arch powerpc in the Linux kernel terminology). There seems to be very little

What makes Apple's PowerPC memcpy so fast?

空扰寡人 提交于 2019-12-04 16:05:32
问题 I've written several copy functions in search of a good memory strategy on PowerPC. Using the Altivec or fp registers with cache hints (dcb*) doubles the performance over a simple byte copy loop for large data. Initially pleased with that, I threw in a regular memcpy to see how it compared... 10x faster than my best! I have no intention of rewriting memcpy, but I do hope to learn from it and accelerate several simple image filters that spend most of their time moving pixels to and from memory

Threading Implementation

喜你入骨 提交于 2019-12-04 12:36:48
I wanted to know how to implement my own threading library. What I have is a CPU (PowerPC architecture) and the C Standard Library. Is there an open source light-weight implementation I can look at? At its very simplest a thread will need: Some memory for stack space Somewhere to store its context (ie. register contents, program counter, stack pointer, etc.) On top of that you will need to implement a simple "kernel" that will be responsible for the thread switching. And if you're trying to implement pre-emptive threading then you'll also need a periodic source of interrupts. eg. a timer. In

PowerPC moving to variable SPR

依然范特西╮ 提交于 2019-12-04 11:40:00
I'm writing an assembly macro to a C-program, and being quite new with this I have gotten stuck on something. I'm trying to write a macro for moving data from a general purpose register to a special purpose register. My problem is that the syntax I've found to move data from a GPR to an SPR takes a constant SPR value, while I want to use a variable one stored in another register. # SPR is constant, rA is the value to be written mtspr SPR, rA I'm after something that looks like this: # rA contains the number of the SPR, and rB the value to be moved. AWESOMEmtspr rA, rB Is there a reason there

Is low latency mode safe to use with Linux serial ports?

拜拜、爱过 提交于 2019-12-04 10:50:01
Is it safe to use the low_latency tty mode with Linux serial ports? The tty_flip_buffer_push function is documented that it "must not be called from IRQ context if port->low_latency is set." Nevertheless, many low-level serial port drivers call it from an ISR whether or not the flag is set. For example, the mpc52xx driver calls flip buffer unconditionally after each read from its FIFO. A consequence of the low latency flip buffer in the ISR is that the line discipline driver is entered within the IRQ context. My goal is to get latency of one millisecond or less, reading from a high speed

PowerPC emulation: Qemu, PearPC, or… ?

♀尐吖头ヾ 提交于 2019-12-04 09:32:31
问题 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 get direct access to one anytime soon, i'm looking for some kind of emulation software to test my code. Problem is, i've found no "easy to use" solution in this area. It seems there are at least 2 possibles solutions, one using QEMU, and the other