x86-64

Fastest factorial implementation with 64-bit result in assembly.

This is not homework, just something I though of. So, straight computing factorial is not exactly fast; memoization can help, but if the result is to fit into 32 or 64 bits, then the factorial only can work for inputs 0 through 12 and 20 respectively. So ... we might as well use a lookup table: n n! 0 1 1 1 2 2 ...

Symbol not found: _OBJC_CLASS_$_Article

I am working on an extension to Vienna to add the ability for third parties to write Objective-C plugins, but I am getting some runtime linker issues only when running in 64-bit mode (everything appears to work fine in 32-bit mode). My plugin, SynkPlugin, is loaded by the following code in Vienna.app: NSArray * bundlePaths = [NSBundle p...

Unexplained stack allocation in native C code built for x64 under Visual Studio 2010.

I am trying to use CL 16.0 for x64 (VS 2010) to produce some readable 64-bit ASM code for an example, but CL insists on preallocating a ton of stack space (28h bytes), with the following line: sub rsp, 40 ; 00000028H (actual value depends on number of local vars of course) Question is, how can I disable this behavior? It is difficult...

How to make 64 bit dll compatible with 64-bit editions of Windows Server 2008, Windows 7, and Windows XP?

I have compiled a dll on Windows Server 2008 64 bit edition. It works fine on that version of Windows, but if I switch to Windows 7 or XP 64 bit edition the dll does not work. How can I make the dll compatible with all three versions of 64bit edition windows? I am using Visual Studio 2010. ...

How to use RIP Relative Addressing in a 64-bit assembly program?

How do I use RIP Relative Addressing in a Linux assembly program for the AMD64 archtitecture? I am looking for a simple example (a Hello world program) that uses the AMD64 RIP relative adressing mode. For example the following 64-bit assembly program would work with normal (absolute addressing): .text .global _start _start: mo...

Installing FMS on x86_64,fedora

When I follow the steps installing FMS 3.0.5 on linux, get this error: [root@server FMS_3_0_5_r601]# ./installFMS ERROR: Your architecture, \'x86_64\', is not supported by the Adobe Flash Media Server installer. [root@server FMS_3_0_5_r601]# Anyone managed to install it on x86_64 linux so far? ...

Stumbling points when going from 32 to 64 bit

I recently received a PC running Windows 7 for future development as this will be closer to our production environment. I was in the middle of working on a solution on my old machine (Windows XP 32 bit), but decided to start working on it with the new box to try to work out any kinks. I have visual studio 2008 installed on both boxes. T...

Installing x86_64 version of ddd, but missing .so libraries

I am trying to install ddd on my x86_64 GNU/Linux machine. I have tried installing a few different versions of ddd, but when I type "rpm -i ddd..." I get: ddd-> rpm -i ddd-3.3.11-14.el5.4.x86_64.rpm warning: ddd-3.3.11-14.el5.4.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6 error: Failed dependencies: ...

Zoom out WebView on launch? Xcode x86_64 architecture

Hello, I'm building a Mac application for somebody, and it includes a WebView in it. I have already added the WebKit.framework, but for some reason, I just can't figure out how to zoom out on launch. I know where to put the code so it would do it on launch, but I don't know the code to zoom out. The page I'm viewing is too big for the We...

Setting an NSScrollView uneditable - Xcode x86_64 architecture

Hello, I'm making an application for someone, and I need to make this NSTextView in an NSScrollView uneditable. Whatever I do, I just can't get anything to work. There is no editable or allow editing check box in Interface Builder for it, so I'll to do it programmatically. So far, I have tried the follow codes. [TextView setEditable:NO]...

How to send NSLogs when a user presses a button or does something

Hello, I'm making an application for someone, and theres some things I'd like to monitor. I have NSLogs all set in place for each action, but I want to be able to send those to a console or something. Is there anyway of doing this? Also I don't want the user to know about it, I'm monitoring this because I gave the user a password for an ...

Windows x64 C# x86 console application exe seems to work with "DLL any CPU" Any potential problem ?

My computer runs Windows 7 X64 Enterprise Edition. I need x86 mode for my executable as I use Visual Foxpro OLEDB driver. I thought it was required to compile library DLLs which are used by this exe as "X86". However, DLLs compiled with "Any CPU"seem to work which is quite convenient as they are used somewhere else and no need to main...

Can a process running a 32bit compiled binary use more than 4gb of memory?

Is it possible for a single process running a 32bit compiled version of python in Snow Leopard (64bit machine) to appear to consume > 4gb (say 5.4gb) of virtual memory as seen by the top command? I did a file ...python to see that the binary was not x86, yet it appeared to be consuming over 5gb of memory. My guess is that the librari...

Developing a 64 bit kernel module on a 32 bit distro

My development machine has a 64 bit proc, running a 32 bit distribution. I would like to compile and test a kernel module with a 64 bit kernel. My question is : Is there a 64 bit liveCD with kernel development package included ? If it does not exist, How can I build a module for a 64 bit kernel ? Then I can eventually test it with a li...

How do i write Simple inline asm instruction from C on Linux 64 bit?

Hello, i am writing a simple c program and my requirement is to print RIP(Instruction Pointer) from some function of the program. i dont want to use ptrace. the one thing i tried with inline asm is: asm("movl %%rip, %0;" : "=r"(val) ) this should copy my rip register value to variable val, but i am getting compilation error. if i use ...

Determining Windows OS architecture in a non locale-sensitive manner

Hey all, I'm looking for a reliable way to determine the Windows OS architecture (32-bit or 64-bit) in a manner that isn't sensitive to Windows version or the system locale/display language. I will be using C# to do this. To clarify, I need the OS architecture, not the processor architecture, and not the application architecture. I kno...

assembly and Visual C++ Express 2010 64 Bit

Is it possible to insert assembly code on Visual C++ Express 2010 64 Bit? If not, is there an intrinsic for adc (add with carry)? ...

Micro-optimizations: using intptr_t for flag/bool types.

From what I understand, the definition of intptr_t varies by architecture -- it is guaranteed to have the capacity to represent a pointer that can access all of the uniform address space of a process. Nginx (popular open source web-server) defines a type that is used as a flag(boolean) and this a typedef to intptr_t. Now using the x86-6...

Moving to WIn 7 x64 generates bunch of compile errors in Designer!

I support small local customers with VB2008 and MS Access applications (not VBA!). When I had to replace my machine, the new one came with Win7 64bit. Things failed immediately. I figured out how to compile VB for x86; but when I did that, I got a bunch of compile errors from the designer code, not my own. Typical of the errors is th...

Force gcc to compile 32 bit programs on 64 bit platform

I've got a proprietary program that I'm trying to use on a 64 bit system. When I launch the setup it works ok, but after it tries to update itself and compile some modules and it fails to load them. I'm suspecting it's because it's using gcc and gcc tries to compile them for a 64 bit system and therefore this program cannot use these...