Skip to main content

All Questions

Tagged with
-5 votes
0 answers
82 views

x86 mulss result is diffrent over time [closed]

I am trying to make C++ neural network library and I noticed, that sometimes model with same inputs and same parameter values drastically changes output for no reason. I have no idea why it happens, ...
ZDibLO's user avatar
  • 5
0 votes
0 answers
67 views

Game freezes when i call a function in it from a C++ .dll

In IDA Pro, i found a function in the game that writes text to console. Here is the function: ; void __cdecl write_to_console(char *Format, char ArgList) write_to_console proc near ; CODE ...
Ali Alghamdi's user avatar
0 votes
0 answers
99 views

By default compiler generates assembly code or object code [duplicate]

In conpiler design, in books, it is written that compiler generates assembly code then assembler convert that assembly code into object code. But assembly code is not used, so todays compiler ...
jai patel's user avatar
0 votes
1 answer
73 views

Unresolved external symbol happend when compiling C++

im trying to make a super simple direct syscall. I have 2 file, 1 is the asm file and 1 is the main source file. The ASM look likes: EXTERN wNtAllocateVirtualMemory: DWORD .CODE ...
Brian MJ's user avatar
1 vote
1 answer
52 views

Error LNK2019 unresolved external symbol - MASM (Assembly) + C++ problem with running the project

I need your help with running my code. Here it is: #include <stdio.h> #include <stdlib.h> #include <string.h> extern "C" { void asmMain(void); int asmScanf(char* ...
edodoe's user avatar
  • 61
0 votes
0 answers
66 views

Ms detours, modified rax register on returning

So my code is setup like this. Hook: DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(&Objects_orig, Objects_detour); DetourTransactionCommit(); Detour: void ...
ayes l's user avatar
  • 53
3 votes
1 answer
127 views

Can AVX-512 be used to calculate the multiplication of two 256-bit Integers on a 64 bit computer in C++? Whether using Assembly Language or not

Regarding arbitrary precision arithmetic: Can AVX-512 be used to calculate the multiplication of two 256-bit Integers on a 64-bit computer in C++? Is there an intrinsic Integer data type of 512 bits ...
Snowy Owl's user avatar
3 votes
1 answer
98 views

Effectively calculate horizontal pair avgs in a stream of int16's

Given a series of a pair of int16_ts. First item in each pair is left sound channel sample, second - is right. I want to make them mono: mono = (left + right) / 2 and don't want to lose even the least ...
Tomilov Anatoliy's user avatar
20 votes
2 answers
869 views

How is this function's assembly implementing the conditional?

The following code, int foo(int); int bar(int); int foobar(int i) { int a = foo(i); int b = bar(i); return a == b ? a : b; }; with GCC trunk is compiling to this assembly: foobar(int): ...
Enlico's user avatar
  • 26.7k
1 vote
1 answer
143 views

Comparing Unsigned integers using AVX2 Intrinsics

I want to threshold values greater than 15 using AVX2 instructions but it compares only signed numbers. __m256i *pIn0, *pIn1,*pOut; __m256i a, b, thres = _mm256_set1_epi8(15); //Threshold ...
convoluxon's user avatar
1 vote
0 answers
86 views

WinExec not executing command - return value 0 (MASM in Visual Studio 2022)

When calling WinExec and passing the two variables to it (as per MSDN): UINT WinExec( [in] LPCSTR lpCmdLine, [in] UINT uCmdShow ); I can't seem to get a correct value returned in RAX and the ...
ihateassembly's user avatar
-1 votes
1 answer
124 views

Which is faster? pass by const& or by value in C++ if the struct is simple? [duplicate]

I looked at many posts and I did not found a satisfactory answer. C++ When does it make sense to pass a const struct parameter by value vs. reference? They don't answer the question they say that the ...
user24551355's user avatar
0 votes
0 answers
24 views

Undefined reference to assembly function when linking c++ code [duplicate]

I try to write simple c++ program that calls aarch64 assembly function. But when I try to link it i get this error: usr/bin/ld: /tmp/ccQFRHpO.o: in function `read_file(std::__cxx11::basic_string<...
pl_Olov3's user avatar
0 votes
0 answers
40 views

How landing pad offset and action index can both be 0?

So, I am doing my own personality function (because I can). In this function, I am parsing a call site table. Each record has four fields - callsite offset, callsite length, landing pad offset and ...
tntnkn's user avatar
  • 113
-1 votes
3 answers
94 views

Code in assembler, which must calculate the scalar product

Im new with an assembler.Couldn't find the solution in the ethernet so asking here. This code outputs wrong numbers and i can't get why. #include <iostream> long DotProduct(short int* vec1, ...
Sheesh's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
186