Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

32-bit x86 Position Independent Code - It's that bad

Name: Anonymous 2015-07-17 17:50

http://ewontfix.com/18/

C is too high-level and the compilers are shit.
Don't let a machine do the job of a human.
Write ASM yourself.

Name: Anonymous 2015-07-17 17:59

Why isn't this website made in assembly

Name: Anonymous 2015-07-17 18:13

>>1
Actually, the biggest issue here is with the design of Unix dynamic linkers. You can get a big boost by doing away with lazy symbol resolution, and an even bigger one (for single processes, anyway) if you are willing to dispense with PIC as well. Unfortunately, for historical reasons i386 systems will commonly use both because it takes special effort to avoid them.

Name: Anonymous 2015-07-17 18:50

Cudder has been detected. Dispatching trained queer-rapists.

Name: Anonymous 2015-07-17 19:00

You're supposed to use code segments.

Name: Anonymous 2015-07-17 19:22

>>4
How does one train a queer rapist?

Name: Anonymous 2015-07-17 19:37

>>6
by using one's anus as a treat

Name: Anonymous 2015-07-17 21:22

>>7
And penis punishment as negative reinforcement?

Name: this kills the boner 2015-07-17 21:55

>>8
this kills the boner

Name: Anonymous 2015-07-18 5:03

Compiler optimizations are a mitigation against the threat of programmers writing indecipherable crap "because it's faster".

Name: Anonymous 2015-07-18 7:11

Mitigate these dubs.

Name: Anonymous 2015-07-18 10:09

>>10
Your post made 3 Cudders cry.

Name: Cudder !cXCudderUE 2015-07-18 15:25

>>3
Windows never needed PIC for DLLs, they just use relocation when necessary and fall back to having two copies of pages with relocations if there's an address conflict. It works well enough with only 32 bits, and with 64 bits every DLL can get an essentially unique load address without any problem.

In contrast, dynamic linking on *nix is a horrible mess. GOTs, PLTs, and all that other crap.

Well, a first thought might be to change the register used for the hidden argument, but that can't be done without breaking the ABI contract between the compiler and linker, so it's out.

Fuck the ABI. Why are compilers so stupid? Because the narrowminded academics who wrote them were also too stupid to realise that having fixed calling conventions for every function is idiotic and everyone who came after them just mindlessly copied the same shit. Meanwhile Asm programmers have been naturally using the most suitable way for each function, and only recently are compilers finally introducing "custom calling conventions" as an optimisation.

32-bit x86 has 7 GP registers but all you see are the RISCtards and compiler writers complaining about how insufficient that is. Because they're too fucking retarded to know how to write efficient code or make compilers that can and waste their time complaining about the lack of registers rather than actually trying to make it work.

http://yarchive.net/comp/linux/x86.html

Name: Anonymous 2015-07-18 20:40

>>13
You don't have to use PIC on UNIX either. Granted, most existing binaries do anyway, so if you don't you give up a lot of the benefits of using shared objects in the first place.

Saying that you can make x86 code generators better by making special efforts to respect the architecture's limitations is missing the point. Of course you can improve the situation if you're willing to add special optimizations. The bigger point you seem to miss is that other architectures don't need to deal with any of these issues just to have acceptable performance with PIC.

Even if an optimized implementation for x86 is faster, the cost to produce it outweighs the performance advantages for most users.

Name: Anonymous 2015-07-18 21:08

>>13
what useful software have asm programmers produced

Name: Anonymous 2015-07-18 21:21

Brainfuck has 0 GP registers but all you see are the HLLtards and C programmers complaining about how insufficient that is. Because they're too fucking retarded to know how to write efficient code or make compilers that can and waste their time complaining about the lack of registers rather than actually trying to make it work.

Name: Anonymous 2015-07-18 21:29

x86

"People can decide to become a Satanist, but it has to be in your heart naturally."

Name: Cudder !cXCudderUE 2015-07-19 0:25

>>14
The bigger point you seem to miss is that other architectures don't need to deal with any of these issues just to have acceptable performance with PIC.

You mean like MIPS? LOL.

http://www.extremetech.com/wp-content/uploads/2014/08/AverageEnergy.png

That's what your "elegant RISC" architecture with 32 (31) registers and uniform 3-address instructions gets you: Pathetic efficiency.

PIC is a horrible idea anyway.

Name: Cudder !cXCudderUE 2015-07-19 0:27

...because you don't normally move code around after it's been loaded into memory. Relocate once at load time and then leave it alone, no need for GOTs or PLTs or any of that extra indirection shit on every single call.

Name: Anonymous 2015-07-19 2:36

>>18
No, I mean like ARM. MIPS is a ridiculous strawman; by holding it up, you're being just as intellectually dishonest as your reviled "RISCtards".

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List