新常识:一党专政的性质与后果
معرفی کتاب «新常识:一党专政的性质与后果» نوشتهٔ Daniel Kusswurm و 张雪忠، منتشرشده توسط نشر 2013 در سال 2013. این کتاب در فرمت pdf، زبان zh ارائه شده است.
This book is an instructional text that will teach you how to code x86-64 assembly language functions. It also explains how you can exploit the SIMD capabilities of an x86-64 processor using x86-64 assembly language and the AVX, AVX2, and AVX-512 instruction sets. This updated edition’s content and organization are designed to help you quickly understand x86-64 assembly language programming and the unique computational capabilities of x86 processors. The source code is structured to accelerate learning and comprehension of essential x86-64 assembly language programming constructs and data structures. Modern X86 Assembly Language Programming, Third Edition includes source code for both Windows and Linux. The source code elucidates current x86-64 assembly language programming practices, run-time calling conventions, and the latest generation of software development tools. While it is still theoretically possible to write large sections or an entire application program using assembly language, the demanding requirements of contemporary software development mean that such an approach is both impractical and ill-advised. Instead, this book accentuates the coding x86-64 assembly language functions that are callable from C++. The downloadable software package for this book includes source code that works on both Windows (Visual C++ and MASM) and Linux (GNU C++ and NASM). Before proceeding, it warrants mentioning that this edition of the Modern X86 Assembly Language Programming book doesn’t cover x86-32 assembly language programming. It also doesn’t discuss legacy x86 technologies such as the x87 floating-point unit, MMX, and X86-SSE (Streaming SIMD Extensions). The first edition of this text remains relevant if you’re interested in learning about these topics. This book doesn’t explain x86 architectural features or privileged instructions that are used in operating systems and device drivers. However, if your goal is to develop x86-64 assembly language code for these use cases, you’ll need to thoroughly comprehend the material that’s presented in this book. What You Will Learn: Understand important details of the x86-64 processor platform, including its core architecture, data types, registers, memory addressing modes, and the basic instruction set Use the x86-64 instruction set to create assembly language functions that are callable from C++ Create assembly language code for both Windows and Linux using modern software development tools including MASM (Windows) and NASM (Linux) Employ x86-64 assembly language to efficiently manipulate common data types and programming constructs including integers, text strings, arrays, matrices, and user-defined structures Explore indispensable elements of x86 SIMD architectures, register sets, and data types. Master x86 SIMD arithmetic and data operations using both integer and floating-point operands Harness the AVX, AVX2, and AVX-512 instruction sets to accelerate the performance of computationally-intense calculations in machine learning, image processing, signal processing, computer graphics, statistics, and matrix arithmetic applications Apply leading-edge coding strategies to optimally exploit the AVX, AVX2, and AVX-512 instruction sets for maximum possible performance Who This Book Is For: Software developers who are creating programs for x86 platforms and want to learn how to code performance-enhanced algorithms using the core x86-64 instruction set; developers who need to learn how to write SIMD functions or accelerate the performance of existing code using the AVX, AVX2, and AVX-512 instruction sets; and computer science/engineering students or hobbyists who want to learn or better understand x86-64 assembly language programming and the AVX, AVX2, and AVX-512 instruction sets. Table of Contents 4 About the Author 12 About the Technical Reviewer 13 Acknowledgments 14 Introduction 15 Chapter 1: X86-64 Core Architecture 19 Historical Overview 19 Data Types 21 Fundamental Data Types 21 Numerical Data Types 22 SIMD Data Types 23 Miscellaneous Data Types 25 X86-64 Processor Architecture 26 General-Purpose Registers 27 Instruction Pointer 28 RFLAGS Register 28 Floating-Point and SIMD Registers 30 MXCSR Register 32 Instruction Operands 33 Memory Addressing 34 Condition Codes 36 Differences Between X86-64 and X86-32 38 Legacy Instruction Sets 41 Summary 41 Chapter 2: X86-64 Core Programming – Part 1 42 Source Code Overview 42 Assembler Basics 44 Integer Arithmetic 44 Integer Addition and Subtraction – 32-Bit 44 Bitwise Logical Operations 49 Shift Operations 53 Integer Addition and Subtraction – 64-bit 58 Integer Multiplication and Division 62 Summary 67 Chapter 3: X86-64 Core Programming – Part 2 68 Simple Stack Arguments 68 Mixed-Type Integer Arithmetic 76 Memory Addressing Modes 85 Condition Codes 92 Assembly Language For-Loops 98 Summary 104 Chapter 4: X86-64 Core Programming – Part 3 106 Arrays 106 One-Dimensional Arrays 106 Multiple One-Dimensional Arrays 111 Two-Dimensional Arrays 118 Strings 124 Counting Characters 124 Array Compare 129 Array Copy and Fill 133 Array Reversal 137 Assembly Language Structures 142 Summary 147 Chapter 5: AVX Programming – Scalar Floating-Point 149 Floating-Point Programming Concepts 149 Scalar Floating-Point Registers 153 Single-Precision Floating-Point Arithmetic 153 Temperature Conversions 153 Cone Volume/Surface Area Calculation 158 Double-Precision Floating-Point Arithmetic 164 Floating-Point Comparisons and Conversions 169 Floating-Point Comparisons 169 Floating-Point Conversions 179 Floating-Point Arrays 191 Summary 198 Chapter 6: Run-Time Calling Conventions 200 Calling Convention Overview 200 Calling Convention Requirements for Visual C++ 201 Stack Frames 201 Using Non-volatile General-Purpose Registers 206 Using Non-volatile XMM Registers 211 Calling External Functions 218 Calling Convention Requirements for GNU C++ 226 Stack Arguments 226 Using Non-volatile General-Purpose Registers and Stack Frames 230 Calling External Functions 234 Summary 239 Untitled 204 Chapter 7: Introduction to X86-AVX SIMD Programming 243 SIMD Programming Concepts 243 What Is SIMD? 243 SIMD Integer Arithmetic 245 Wraparound vs. Saturated Arithmetic 248 SIMD Floating-Point Arithmetic 249 SIMD Data Manipulation Operations 251 X86-AVX Overview 254 AVX/AVX2 SIMD Architecture Overview 255 SIMD Registers 256 SIMD Data Types 257 Instruction Syntax 258 Differences Between X86-SSE and X86-AVX 258 Summary 260 Chapter 8: AVX Programming – Packed Integers 261 Integer Arithmetic 261 Addition and Subtraction 261 Multiplication 267 Bitwise Logical Operations 274 Arithmetic and Logical Shifts 278 Integer Arrays 282 Pixel Minimum and Maximum 282 Pixel Mean 291 Summary 301 Chapter 9: AVX Programming – Packed Floating-Point 302 Packed Floating-Point Arithmetic 302 Elementary Operations 302 Packed Comparisons 311 Packed Conversions 318 Packed Floating-Point Arithmetic – Arrays 325 Mean and Standard Deviation 325 Distance Calculations 332 Packed Floating-Point Arithmetic – Matrices 342 Column Means 342 Summary 351 Chapter 10: AVX2 Programming – Packed Integers 353 Integer Arithmetic 353 Elementary Operations 354 Size Promotions 359 Image Processing 365 Pixel Clipping 366 Benchmarking 374 RGB to Grayscale 376 Pixel Conversions 386 Image Histogram 391 Summary 399 Chapter 11: AVX2 Programming – Packed Floating-Point – Part 1 401 Floating-Point Arrays 401 Least Squares 402 Floating-Point Matrices 410 Matrix Multiplication 410 Single-Precision 412 Double-Precision 419 Matrix (4 × 4) Multiplication 422 Single-Precision 423 Double-Precision 428 Matrix (4 × 4) Vector Multiplication 431 Single-Precision 432 Double-Precision 441 Covariance Matrix 445 Summary 455 Chapter 12: AVX2 Programming – Packed Floating-Point – Part 2 456 Matrix Inversion 456 Single-Precision 457 Double-Precision 473 Signal Processing – Convolutions 485 1D Convolution Arithmetic 486 1D Convolution Using Variable-Size Kernel 488 Single-Precision 488 Double-Precision 494 1D Convolution Using Fixed-Size Kernel 497 Single-Precision 497 Double-Precision 501 Summary 504 Chapter 13: AVX-512 Programming – Packed Integers 506 AVX-512 Overview 506 Execution Environment 507 Merge Masking and Zero Masking 509 Embedded Broadcasts 511 Instruction-Level Rounding 512 Integer Arithmetic 513 Elementary Operations 513 Masked Operations 521 Image Processing 532 Image Thresholding 532 Image Statistics 541 Image Histogram 554 Summary 558 Chapter 14: AVX-512 Programming – Packed Floating-Point – Part 1 559 Floating-Point Arithmetic 559 Elementary Operations 559 Packed Comparisons 569 Floating-Point Arrays 576 Floating-Point Matrices 582 Covariance Matrix 583 Matrix Multiplication 587 Single-Precision 588 Double-Precision 591 Matrix (4 × 4) Vector Multiplication 594 Single-Precision 594 Double-Precision 599 Summary 604 Chapter 15: AVX-512 Programming – Packed Floating-Point – Part 2 605 Signal Processing 605 1D Convolution Using Variable-Size Kernel 605 Single-Precision 606 Double-Precision 610 1D Convolution Using Fixed-Size Kernel 614 Single-Precision 614 Double-Precision 617 Summary 620 Chapter 16: Advanced Assembly Language Programming 621 CPUID Instruction 621 Processor Vendor Information 621 X86-AVX Detection 625 Non-temporal Memory Stores 633 Integer Non-temporal Memory Stores 634 Floating-Point Non-temporal Memory Stores 637 SIMD Text Processing 643 Summary 648 Chapter 17: Assembly Language Optimization and Development Guidelines 649 Assembly Language Optimization Guidelines 649 Basic Techniques 650 Floating-Point Arithmetic 651 Branch Instructions 652 Branch Prediction Unit 652 Data Alignment 654 SIMD Techniques 655 Assembly Language Development Guidelines 656 Identify Functions for x86-64 Assembly Language Coding 656 Select Target x86-AVX Instruction Set 656 Establish Benchmark Timing Objectives 657 Code x86-64 Assembly Language Functions 657 Benchmark x86-64 Assembly Language Code 657 Optimize x86-64 Assembly Language Code 657 Repeat Benchmarking and Optimization Steps 657 Summary 658 Appendix A: Source Code and Development Tools 659 Source Code Download and Setup 659 Source Code Development Tools 660 Windows Development Tools 660 Running a Source Code Example 661 Creating a Visual Studio C++ Project 661 Create a C++ Project 662 Add an Assembly Language File 664 Set Project Properties 665 Edit the Source Code 668 Build and Run the Project 671 Linux Development Tools 672 Additional Configuration 672 Build and Run 672 Make Utility 673 Appendix B: References and Resources 676 X86 Assembly Language Programming References 676 Algorithm References 678 C++ References 679 Software Development Tools 679 Miscellaneous Utilities, Tools, and Libraries 679 Index 681 df-Capture.PNG 1
دانلود کتاب 新常识:一党专政的性质与后果