instructions

Small Popup for Instructions, like foursquare ones

♀尐吖头ヾ 提交于 2019-12-03 16:44:55
问题 After seeing the last screenshots of new foursquare application and their balloon like cartoon instructions, I'd like to create some of these in my application. I found a similar question for iPhone Small popup for instructions... How? Here is another screenshot of foursquare app: I'd like to know how I could achieve that with Android. Thanks in advance for any help. UPDATE : This is what I could get so far but adding some buttons with a custom drawn background and layering them with a

Is there a list of deprecated x86 instructions?

試著忘記壹切 提交于 2019-12-03 16:34:29
问题 I'm taking an x86 assembly language programming class and know that certain instructions shouldn't be used anymore -- because they're slow on modern processors; for example, the loop instruction. I haven't been able to find any list of instructions that are considered deprecated and should be avoided; any guidance would be appreciated. 回答1: Your best bet is to consult Intel's official optimization guide. This an other manuals can be found here. 回答2: Oh, but there still might be a good reason

SSE Instructions: Byte+Short

喜你入骨 提交于 2019-12-03 15:32:43
I have very long byte arrays that need to be added to a destination array of type short (or int ). Does such SSE instruction exist? Or maybe their set ? You need to unpack each vector of 8 bit values to two vectors of 16 bit values and then add those. __m128i v = _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); __m128i vl = _mm_unpacklo_epi8(v, _mm_set1_epi8(0)); // vl = { 7, 6, 5, 4, 3, 2, 1, 0 } __m128i vh = _mm_unpackhi_epi8(v, _mm_set1_epi8(0)); // vh = { 15, 14, 13, 12, 11, 10, 9, 8 } where v is a vector of 16 x 8 bit values and vl , vh are the two unpacked vectors of 8

difference between conditional instructions (cmov) and jump instructions [duplicate]

。_饼干妹妹 提交于 2019-12-03 10:17:49
This question already has an answer here: Why is a conditional move not vulnerable for Branch Prediction Failure? 5 answers I'm confused where to use cmov instructions and where to use jump instructions in assembly? From performance point of view: What is the difference in both of them? Which one is better? If possible, please explain their difference with an example. Ira Baxter movcc is a so-called predicated instruction. That's fancy-speak for "this instruction executes under a condition (predicate)". Many processors, including the x86, after doing an arithmetic operation (especially compare

Does ret instruction cause esp register added by 4?

穿精又带淫゛_ 提交于 2019-12-02 21:16:27
Does "ret" instruction cause "esp" register added by 4? Yes, it performs pop eip You can use mov eax, [esp] jmp eax to avoid it. EDIT: It's exactly what ret does. For example, jmp rel_offet is nothing than a hidden add eip, offset , or jmp absolute_offset is mov eip, absolute_offset . Sure there are differences in the way the processor treats them, but from programmer's point of view it's all that happens. Also, there is a special form of ret : ret imm8 that also adds this imm8 value to esp : for example a __stdcall function uses it to discard its parameters from the stack. Not to mention retf

Tracing/profiling instructions

这一生的挚爱 提交于 2019-12-02 20:53:49
I'd like to statistically profile my C code at the instruction level. I need to know how many additions, multiplications, divisions, etc I'm performing. This is not your usual run of the mill code profiling requirement. I'm an algorithm developer and I want to estimate the cost of converting my code to hardware implementations. For this, I'm being asked the instruction call breakdown during run-time (parsing the compiled assembly isn't sufficient as it doesn't consider loops in the code). After looking around, it seems VMware may offer a possible solution, but I still couldn't find the

How are applications and data accessed by the CPU from RAM

偶尔善良 提交于 2019-12-02 11:56:36
问题 I am having a bit of trouble understanding how applications and data are accessed by the CPU from RAM after the application has been loaded into RAM and a file opened (thus data for the file also stored in RAM). By my understanding, a CPU just gets instructions from RAM as the program counter ticks or carries out tasks after an interrupt. How then does it access the application and data. Is it that it doesn't and still just gets instructions (for example to load a file on the hard drive to be

what does machine value type “other” mean in llvm SDnodes

£可爱£侵袭症+ 提交于 2019-12-02 07:13:37
问题 I am trying to understand more deeply the instruction selection process in llvm and for that I am debuging step-by-step the CodeGenAndEmitDAG function. I have printed a small function (see below) just before the combine step - the first step in the above function. In the graph I see blue lines and it seems that they are always pointing at "ch" , which I think means "other" machine value type. What I don't understand is the meaning of the blue lines... what is this dependency ? And, am I right

what does machine value type “other” mean in llvm SDnodes

喜夏-厌秋 提交于 2019-12-02 00:26:20
I am trying to understand more deeply the instruction selection process in llvm and for that I am debuging step-by-step the CodeGenAndEmitDAG function. I have printed a small function (see below) just before the combine step - the first step in the above function. In the graph I see blue lines and it seems that they are always pointing at "ch" , which I think means "other" machine value type. What I don't understand is the meaning of the blue lines... what is this dependency ? And, am I right about the meaning of "ch" ? is it "other" ? Dashed blue arrows represent non-dataflow dependencies

What is the meaning of parentheses in opcodes in a NASM generated listing file?

无人久伴 提交于 2019-12-02 00:01:25
问题 When looking at a listing file that was generated by NASM, I see that there are three kinds of opcodes: Without parentheses. With round parentheses. With square parentheses. What they mean? when each of them is used? This is an example of a listing file that demonstrate all of the above: 1 section .text 2 extern printf 3 extern fgets 4 00000000 313233 str3: db "123" 5 main: 6 00000003 68[00000000] push str1 7 00000008 68[09000000] push str2 8 0000000D 68[00000000] push str3 9 00000012 E8