x86

How to use gnu gcc flag -mpc32, -mpc64 and -mpc80?

≯℡__Kan透↙ 提交于 2021-01-25 20:21:37
问题 I got these GCC flags from the GNU GCC compiler Manual. But when I tried to use those flags ( -mpc32 , -mpc64 and -mpc80 ) I couldn't observe the behavior. So I need help on how to use these flags with a sample code. sample code I tried: test.cpp #include<stdio.h> #include<iomanip> #include<math.h> int main() { double weight = 1.0f; double roiSize = 137.142364501953125f; double thresholdValue = 5400.0f; double alpha = weight / (roiSize * thresholdValue * thresholdValue); std::cout<<std:

How to use gnu gcc flag -mpc32, -mpc64 and -mpc80?

流过昼夜 提交于 2021-01-25 20:21:21
问题 I got these GCC flags from the GNU GCC compiler Manual. But when I tried to use those flags ( -mpc32 , -mpc64 and -mpc80 ) I couldn't observe the behavior. So I need help on how to use these flags with a sample code. sample code I tried: test.cpp #include<stdio.h> #include<iomanip> #include<math.h> int main() { double weight = 1.0f; double roiSize = 137.142364501953125f; double thresholdValue = 5400.0f; double alpha = weight / (roiSize * thresholdValue * thresholdValue); std::cout<<std:

How to use gnu gcc flag -mpc32, -mpc64 and -mpc80?

妖精的绣舞 提交于 2021-01-25 20:21:10
问题 I got these GCC flags from the GNU GCC compiler Manual. But when I tried to use those flags ( -mpc32 , -mpc64 and -mpc80 ) I couldn't observe the behavior. So I need help on how to use these flags with a sample code. sample code I tried: test.cpp #include<stdio.h> #include<iomanip> #include<math.h> int main() { double weight = 1.0f; double roiSize = 137.142364501953125f; double thresholdValue = 5400.0f; double alpha = weight / (roiSize * thresholdValue * thresholdValue); std::cout<<std:

Bootloader is Not loading the kernel

江枫思渺然 提交于 2021-01-24 10:56:47
问题 I am developing my Operating System. I got error on booting my OS. The error was: KERNEL.BIN not found! Here are the Codes: Boot.asm ; The Aqua_Seven_OS Operating System bootloader ; ================================================================== BITS 16 jmp short bootloader_start ; Jump past disk description section nop ; Pad out before disk description ; ------------------------------------------------------------------ ; Disk description table, to make it a valid floppy ; Note: some of

Square Brackets ? why are these used in LEA?

喜你入骨 提交于 2021-01-24 08:18:13
问题 In assmebly the square brackets seem to have the same meaning as * in C. They are used to dereference a pointer. Dereferencing a pointer means going to refer to a specific memory location to read or write it. So it is quite logical to use square brackets in the case of a MOV. But what is the logical reason why they also use it for LEA. LEA EAX, [EBP -4], looks like dereferencing a pointer, ebp - 4, to refer to the pointed memory location but it will not read the value contained in the

Instruction FYL2XP1

自闭症网瘾萝莉.ら 提交于 2021-01-23 06:33:47
问题 I'm wondering why the instruction FYL2XP1 on x86-architecture computes exactly the mathematical formula y · log 2 ( x + 1). What's special with this formula? 回答1: The y operand is usually a compile time constant, for the moment forget about the x + 1 . Since log_b(x) = log_b(2) * log_2(x) the instruction allows to compute the logarithm in any base of x + 1 . Note that log_b(2) is a constant since it is seldom necessary to compute the logarithm with a degree of freedom in the base. FYL2XP1 and

Find min/max value from a __m128i

◇◆丶佛笑我妖孽 提交于 2021-01-20 20:20:28
问题 I want to find the minimum/maximum value into an array of byte using SIMD operations. So far I was able to go through the array and store the minimum/maximum value into a __m128i variable, but it means that the value I am looking for is mixed among others (15 others to be exact). I've found these discussions here and here for integer, and this page for float, but I don't understand how works _mm_shuffle*. So my questions are: What SIMD operations do I have to perform in order to extract the

Find min/max value from a __m128i

假如想象 提交于 2021-01-20 20:18:26
问题 I want to find the minimum/maximum value into an array of byte using SIMD operations. So far I was able to go through the array and store the minimum/maximum value into a __m128i variable, but it means that the value I am looking for is mixed among others (15 others to be exact). I've found these discussions here and here for integer, and this page for float, but I don't understand how works _mm_shuffle*. So my questions are: What SIMD operations do I have to perform in order to extract the

How Does BIOS initialize DRAM?

我的梦境 提交于 2021-01-20 20:08:23
问题 I've been searching all over for an explanation of how exactly BIOS works now for quite some time. I have designed a bootloader and have jumped to 32-bit mode with it while successfully initializing the IDT as well as the GDT, but in doing so, I have found "operating systems" seeming to be quite simple, and the feeling as if "BIOS" IS the actual operating system of every computer. So now I have took on a new challenge of trying to discover how BIOS actually initializes itself, discovers how

How Does BIOS initialize DRAM?

牧云@^-^@ 提交于 2021-01-20 20:07:54
问题 I've been searching all over for an explanation of how exactly BIOS works now for quite some time. I have designed a bootloader and have jumped to 32-bit mode with it while successfully initializing the IDT as well as the GDT, but in doing so, I have found "operating systems" seeming to be quite simple, and the feeling as if "BIOS" IS the actual operating system of every computer. So now I have took on a new challenge of trying to discover how BIOS actually initializes itself, discovers how