64-bit

How can I write self-modifying code that runs efficiently on modern x64 processors?

自古美人都是妖i 提交于 2019-12-20 09:38:03
问题 I'm trying to speed up a variable-bitwidth integer compression scheme and I'm interested in generating and executing assembly code on-the-fly. Currently a lot of time is spent on mispredicted indirect branches, and generating code based on the series of bitwidths as found seems to be the only way avoid this penalty. The general technique is referred to as "subroutine threading" (or "call threading", although this has other definitions as well). The goal is to take advantage of the processors

How do you create a random 64 bit number? [closed]

丶灬走出姿态 提交于 2019-12-20 07:48:46
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have part of a spec that requires me to create a random 64 bit number with the following converted to a character string : (0 to 2^63 - 1) I have no idea what this means in the brackets, can anyone help? 回答1: The parenthesis is set-builder notation for a random 64 bit number between 0 and 2^63-1, not including

What gdb commands should I use to narrow down where in label 'main' did I get the segmentation fault?

坚强是说给别人听的谎言 提交于 2019-12-20 07:37:47
问题 Here's my assembly code and my main subroutine. Here are my macros and constants: .text fmt: .string "x \t\t ln(x)\n" sfmt: .string "%.10lf \t %.10lf\n" error: .string "Error" filename: .string "input.bin" .data LIM: .double 0r1.0E-13 zero: .double 0r0.0 one: .double 0r1.0 half: .double 0r0.5 define(i_r,w19) define(j_r,w20) define(n_r,w21) define(fd_r,w22) define(ln_x,d8) define(cur_term,d24) define(n_read,x25) define(x_j,d26) BUF_SIZE = 98*8 AT_FDCWD = -100 O_RDONLY = 0 buf_s = 16 .bss x_arr

Windows 7 kernel driver signing

落花浮王杯 提交于 2019-12-20 07:17:11
问题 I am an individual, not a company. I am well aware that I can test sign a driver and run in test mode. However myself and the other person on the project are interested in getting our module signed. Question is: it looks like verisign requires you to be an actual business. Is there anyway we can get a signature through globalsign or something? As an individual developer. Under the windows 7 x64 OS? Or is it just a big screw you to the individual? 回答1: Why not register a sole proprietorship

Does mmap always return higher address

大兔子大兔子 提交于 2019-12-20 06:01:11
问题 Does mmap (when called with MAP_ANONYMOUS, that is, for allocating memory) always return higher memory address than a previous call? If not so, Is there any way to make it return a higher address always? 回答1: By default, mmap can return any address aligned on a page boundary, in any order. If you want to enforce that the returned address is the one you specify, you can use the MAP_FIXED flag, but that isn't very portable and reliable. This way you are tying your code with the particular

Calling the Javascript functions inside C# for a 64 bit project

感情迁移 提交于 2019-12-20 05:55:02
问题 I am trying to call the Javascript function "eval" from inside C# code (to utilise the string to operators parser). I used the following code: https://stackoverflow.com/a/12431435/712700 It crashes though with the following message--- : Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC} failed due to the following error: 80040154 Class not registered (Exception from HRESULT:

x64 bit assembly

天大地大妈咪最大 提交于 2019-12-20 05:21:49
问题 I started assembly (nasm) programming not too long ago. Now I made a C function with assembly implementation which prints an integer. I got it working using the extended registers, but when I want to write it with the x64 registers (rax, rbx, ..) my implementation fails. Does any of you see what I missed? main.c: #include <stdio.h> extern void printnum(int i); int main(void) { printnum(8); printnum(256); return 0; } 32 bit version: ; main.c: http://pastebin.com/f6wEvwTq ; nasm -f elf32 -o

x64 bit assembly

≡放荡痞女 提交于 2019-12-20 05:21:42
问题 I started assembly (nasm) programming not too long ago. Now I made a C function with assembly implementation which prints an integer. I got it working using the extended registers, but when I want to write it with the x64 registers (rax, rbx, ..) my implementation fails. Does any of you see what I missed? main.c: #include <stdio.h> extern void printnum(int i); int main(void) { printnum(8); printnum(256); return 0; } 32 bit version: ; main.c: http://pastebin.com/f6wEvwTq ; nasm -f elf32 -o

Does InstallShield Limited Edition Support 64 bit Installer?

对着背影说爱祢 提交于 2019-12-20 04:57:07
问题 I just started to learn InstallShield LE because it seems the only "officially" supported installer project. But I have one simple question that I can't even get a absolute answer: does ISLE support building a 64bit installer? I am asking because I found at least two posts saying that it is impossible, like this one: Replacing VS Setup projects with Installshield Limited Edition problematic. However, I can't get a (negative or positive)confirmation from flexera's website. They don't even seem

64-bit unsigned integers which cannot map onto a double [duplicate]

▼魔方 西西 提交于 2019-12-20 04:19:45
问题 This question already has answers here : Are all integer values perfectly represented as doubles? [duplicate] (5 answers) Closed last year . Are there any 64-bit unsigned integer values which cannot be represented with a double-precision floating-point type? (As a double is also 64-bit wide there must be some.) If so, how can I calculate all of them? (In a not brute force way, maybe?) 回答1: Every integer from 0 to 2^52 inclusive is representable exactly, from 2^52 to 2^53 only every even