Fine-grained control of instruction attributes

EP4405805A4Pending Publication Date: 2024-11-27HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
EP2021958635
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2024-11-27

Smart Images

  • Figure 1.1
    Figure 1.1
Patent Text Reader

Abstract

A device comprises processing circuitry adapted for executing a plurality of compiled computer instructions. Executing the plurality of compiled computer instructions comprises identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code. In response to identifying the mark, a state of the processing circuitry is configured to apply an identified execution attribute to at least one of the one or more marked instructions. When executing the one or more marked instructions, the identified execution attribute is applied thereto according to the configured state of the processing circuitry.
Need to check novelty before this filing date? Find Prior Art

Description

FINE-GRAINED CONTROL OF INSTRUCTION ATTRIBUTESBACKGROUND

[0001] Some embodiments described in the present disclosure relate to a computerized apparatus and, more specifically, but not exclusively, to adevice for executing code.

[0002] Computer instructions are a set of machine language instructions that a particular processing circuitry understands and executes. A typical computer instruction is represented by a sequence of binary bits that encode one or more properties of the computer instruction. Properties of a computer instruction may include an operation code (opcode) specifying an operation to be performed and one or more addresses each containing a location of an operand of the operation. For some processing circuitries, a computer instruction encodes one or more modes that specify how the one or more operands are located in memory.

[0003] For brevity, henceforth the term “instruction” is used to mean “computer instruction” and the terms are used interchangeably.

[0004] Some computer instructions have associated execution attributes that govern how the computer instruction is to be executed. For example, an instruction may be a member of a memory transaction in processing circuitry that supports Transactional Memory (TM) , for example anARM Transactional Memory Extension (TME) transaction, an International Business Machines (IBM) Transactional Memory (IBM TM) transaction in a Performance Optimization With Enhanced Reduced Instruction Set Computer Central Processing Unit (POWER CPU) and an Intel Transactional Synchronization Extensions (TSX) transaction. When the instruction is a member of a TM transaction, when the TM transaction fails then an outcome of executing the instruction may need to be undone. Another example of an execution attribute is memory-tagging tag checking, some examples beingARM Memory Tagging Extension (MTE) and SPARC Application Data Integrity (ADI) , where a tag (a memory tag) may be assigned to each memory allocation made in a memory accessed by the processing circuitry, and access to memory is by a pointer having a correct tag. A Memory-Taggingtag checking attribute governs whether a memory tag is checked by the processing circuitry when accessing memory. Another example is requiring a synchronous exception when completing execution of an instruction, for example an instruction to access a device connected to the processing circuitry, for example using ARM SDERR.

[0005] For brevity, unless otherwise stated, the term “attribute” refers to an execution attribute, and the terms are used interchangeably.

[0006] The term “applying an attribute” refers to executing a computer instruction according to an execution attribute. According to some current common practices, whether a processing circuitry applies an execution attribute when executing an instruction, i.e. executes the instruction according to theexecution attribute, is controlled using an attribute state of the processing circuitry or of an execution thread. According to such practices, the attribute state applies to all instructions executed by the processing circuitry, or by an execution thread, to which the execution attribute applies. For example, when memory-tagging tag checking is enabled, tag checking is applied to all memory access instructions.

[0007] For some attributes that apply to memory access, applying an attribute may be controlled based on a memory address being accessed, for example per memory-page using a page table. In such a system, when an attribute is enabled for a memory page the attribute is applied to all memory accesses to the page.

[0008] Due to the coarse granularity of control over application of an attribute, based on a global attribute state of the processing circuitry or of an execution thread, or based on an attribute state associated with a memory page, it may be the case that an attribute is applied to a particular instruction even though there is no functional need for the attribute to be applied to that particular instruction. For example, it may be the case that there is a need to wait for a synchronous exception when accessing a device in one part of a computer program but there is no need to wait for a synchronous exception when accessing the device in another part of the computer program. In another example, practical implementations of TM transactions limit an amount of store instructions in a single transaction. It may be that in a sequence of store instructions in a transactionnot all store instructions are relevant to the transaction, however their existence in the sequence of store instructions in the transaction prohibits adding other store instructions to the transaction.

[0009] Applying an attribute may increase an amount of time required to execute a computer instruction, reducing performance of executing a plurality of computer instructions, for example reducing an amount of operations performed in a given time (throughput) and additionally or alternatively increasing an amount of time to complete a task (latency) .

[0010] There is a need to reduce an amount of times an attribute is applied to instructions in a plurality of computer instructions, when applying the attribute is not required by a functionality of the plurality of computer instructions.

[0011] SUMMARY

[0012] The present disclosure includes a description of a device and a method for fine-grained control of applying an execution attribute to a computer instruction when executing a plurality of compiled computer instructions by adding a mark to the plurality of compiled computer instructions according to one or more programmer directives in a source code used for generating the plurality of compiled computer instructions, and in response to identifying the mark configuring a state of a processing circuitry to apply an identified execution attribute to at least one of one or more marked instructions when executing the plurality of compiled computer instructions. The mark may mark one or more marked instructions of the plurality of compiled instructions. Adding a mark according to one or more programmer directives allows controlling when the attribute is applied per instruction instead of global control of applying the attribute.

[0013] The foregoing and other objects are achieved by the features of the independent claims. Further implementation forms are apparent from the dependent claims, the description and the figures.

[0014] According to a first aspect, a device comprises processing circuitry adapted for executing a plurality of compiled computer instructions, comprising: identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code; in response to identifying the mark, configuring a state of the processing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry. Applying the identified execution attribute to the one or more marked instructions according to the configured state of the processing circuitry facilitates differential application of the identified execution attribute to the plurality of compiled computer instructions, increasing performance of a device implemented according to the present disclosure compared to a device implemented to apply the identified execution attribute to all of the plurality of compiled computer instructions to which the identified execution attribute can be applied.

[0015] According to a second aspect, a method for executing a plurality of computer instructions comprises: identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code; in response to identifying the  mark, configuring a state of a processing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.

[0016] According to a third aspect, a software program product for executing a plurality of compiled computer instructions comprises: a non-transitory computer readable storage medium; first program instructions for identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code; second program instructions for in response to identifying the mark, configuring a state of a processing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andthird program instructions for when executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry. The first, second and third program instructions are executed by at least one computerized processor from the non-transitory computer readable storage medium.

[0017] According to a fourth aspect, an apparatus for generating a plurality of compiled computer instructions comprises a processing unit adapted for: identifying in a source code at least one programmer directive indicative of differential enforcement of an identified execution attribute; generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least one programmer directive in the source code; and providing the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising: identifying the mark in the plurality of compiled computer instructions; in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.

[0018] According to a fifth aspect, a method for generating a plurality of compiled computer instructions comprises: identifying in a source code at least one programmer directive indicative of differential enforcement of an identified execution attribute; generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least  one programmer directive in the source code; and providing the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising: identifying the mark in the plurality of compiled computer instructions; in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.

[0019] According to a sixth aspect, a software program product for generating a plurality of compiled computer instructions comprises: a non-transitory computer readable storage medium; first program instructions for identifying in a source code at least one programmer directive indicative of differential enforcement of an identified execution attribute; secondprogram instructions for generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least one programmer directive in the source code; and third program instructions for providing the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising: identifying the mark in the plurality of compiled computer instructions; in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry. The first, second and third program instructions are executed by at least one computerized processor from the non-transitory computer readable storage medium.

[0020] In an implementation form of the first and second aspects, each of the plurality of compiled computer instructions has an operation code selected from a plurality of operation codes; the identified execution attribute applies to an identified set of operation codes of the plurality of operation codes; and the at least one programmer directive is indicative of differential application of the identified execution attribute when executing at least some of the plurality of compiled computer instructions, each having a respective operation code that is a member of the identified set of operation codes. Optionally, the plurality of compiled computer instructions comprises a first instruction having a first operation code selected from the identified set of operation codes, and a second instruction having a second operation code selected from the identified set of operation codes. Optionally, applying the identified execution attribute to the one or more marked instruction according to the configured state of the  processing circuitry comprises: executing the first instruction according to the identified execution attribute; and executing the second instruction not according to the identified execution attribute. Applying the identified execution attribute to first instruction and not to the second instruction when both the first operation code of the first instruction and the second operation code of the second instruction are selected from the set of operation codes to which the identified execution attribute can be applied reduces an amount of times the identified execution attribute is applied, increasing performance of a device implemented according to the present disclosure compared to a device implemented to apply the identified execution attribute to all of the plurality of compiled computer instructions to which the identified execution attribute can be applied.

[0021] In another implementation form of the first and second aspects, the at least one programmer directive applies to an identified part of the source code. Optionally, the identified part of the source code is an identified source code instruction of the source code. Optionally, the identified part of the source code is a plurality of source code instructions of the source code. Optionally, the identified part of the source code is another plurality of source code instructions for performing a transaction operation. Applying the at least one programmer directive to an identified part of the source code facilitates reducing an amount of times the identified execution attribute is applied when executing the plurality of compiled computer instructions generated from the source code.

[0022] In a further implementation form of the first and second aspects, the mark is added to the plurality of compiled computer instructions, comprising at least one of: modifying one or more bits in a plurality of binary bits of a binary representation of at least one marked instruction of the one or more marked instructions; replacing at least one of at least one other marked instruction of the one or more marked instructions with a dedicated computer instruction for executing according to the identified execution attribute; andinserting into the plurality of compiled computer instructions at least one directive instruction, according to the at least one programmer directive. Inserting at least one directive instruction according to the at least one programmer directive facilitates instructing the processing circuitry when to apply the identified execution attribute when executing the plurality of compiled computer instructions, thus enabling to reduce an amount of times the identified execution attribute is applied when executing the plurality of compiled computer instructions. Each of modifying one or more bits of a binary representation of an instruction and replacing an instruction with a dedicated computer instruction for executing according to the identified execution attribute, each on its own  facilitates distinguishing between instructions to which the identified execution attribute should be applied and other instructions to which the identified execution attribute should not be applied, thus reducing an amount of times the identified execution attribute is applied when executing the plurality of compiled computer instructions. In addition, modifying one or more bits of the binary representation of the instruction facilitates supporting a greater amount of execution attributes than is practical to support by using a dedicated computer instruction for each of the execution attributes. Optionally, the device further comprises a memory, connected to the processing circuitry, storing the plurality of compiled computer instructions. Optionally, the at least one programmer directive applies to an identified part of the source code. Optionally, the at least one directive instruction comprises a range of addresses in the memory storing at least some of the plurality of compiled computer instructions associated with the identified part of the source code. Optionally, configuring the state of the processing circuitry comprises configuring at least one register of the processing circuitry with the range of addresses. Optionally, applying the identified execution attribute to the one or more marked instructions according to the configured state of the processing circuitry comprises: identifying that at least one computer instruction of the one or more marked instructions is stored in the memory in the range of addresses; andexecuting the at least one computer instruction according to the identified execution attribute. Optionally, applying the identified execution attribute to the one or more marked instructions according to the configured state of the processing circuitry further comprises: identifying at least one additional computer instruction that is not stored in the memory in the range of addresses; andexecuting the at least one additional computer instruction not according to the identified execution attribute. Optionally, the at least one directive instruction comprises at least one of: a start instruction to execute following instructions of the plurality of compiled computer instructions according to the identified execution attribute; an end instruction to execute following instructions of the plurality of compiled computer instructions not according to the identified execution attribute; a conditional-end start instruction to execute following instructions of the plurality of compiled computer instructions according to the identified execution attribute until identifying an end condition; and a pattern start instruction, comprising a pattern, to execute according to the pattern some following instructions of the plurality of compiled computer instructions according to the identified execution attribute.

[0023] Optionally, the processing circuitry is further adapted for configuring the state of the processing unit to not apply the identified execution attribute, in response to at least one of:executing the end instruction; identifying the end condition; andrecovering after a wrong  prediction of a branch instruction. Optionally, the conditional-end start instruction comprises an amount of times to apply the identified execution attribute. Optionally, the processing circuitry further comprises an attribute-application counter; Optionally, when executing the plurality of compiled computer instructions, the processing circuitry increases the attribute-application counter when executing a computer instruction according to the identified execution attribute. Optionally, identifying the end condition comprises comparing the attribute application counter to the amount of times to apply the identified execution attribute. Optionally, identifying the end condition comprises identifying at least one of a branch instruction, an interrupt, an exception and a trap. Optionally, applying the identified execution attribute according to the configured state of the processing circuitry further comprises declining to execute the one or more marked instructions according to the identified execution attribute subject to identifying a prohibiting state of the processing circuitry. Declining to execute the one or more marked instructions according to the identified execution attribute subject to identifying a prohibiting state of the processing circuitry increases accuracy of executing the plurality of compiled computer instructions.

[0024] In a further implementation form of the first and second aspects, the identified execution attribute is one of: a memory tagging attribute, a requirement for synchronous exceptions, and a transaction related attribute.

[0025] In an implementation form of the fourth and fifth aspects, the mark, marking the one or more marked instructions, is interpreted as a no-operation instructions (NOP) by at least one other processing circuitry when executing the plurality of compiled computer instructions. Interpreting the mark as a NOP increases usability of the plurality of compiled computer instructions by allowing use thereof on processing circuitry that supports the mark and processing circuitry that does not support the mark. Allowing use of the plurality of compiler instructions on both types of processing circuitry described above is useful when the execution attribute forms a hint for performance optimization that does not affect semantics of the plurality of compiled computer instructions when not applied.

[0026] Other systems, methods, features, and advantages of the present disclosure will be or become apparent to one with skill in the art upon examination of the following drawings and detailed description. It is intended that all such additional systems, methods, features, and advantages be included within this description, be within the scope of the present disclosure, and be protected by the accompanying claims.

[0027] Unless otherwise defined, all technical and / or scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which implementations pertain. Although methods and materials similar or equivalent to those described herein can be used in the practice or testing of implementations, exemplary methods and / or materials are described below. In case of conflict, the patent specification, including definitions, will control. In addition, the materials, methods, and examples are illustrative only and are not intended to be necessarily limiting.

[0028] BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING (S)

[0029] Some embodiments are herein described, by way of example only, with reference to the accompanying drawings. With specific reference now to the drawings in detail, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of embodiments. In this regard, the description taken with the drawings makes apparent to those skilled in the art how embodiments may be practiced.

[0030] In the drawings:

[0031] FIG. 1 is a schematic block diagram of an exemplary apparatus and an exemplary device, according to some embodiments;

[0032] FIG. 2 is a flowchart schematically representing an optional flow of operations for executing a plurality of compiled computer instructions, according to some embodiments;

[0033] FIG. 3 is a flowchart schematically representing an optional flow of operations for generating a plurality of compile computer instructions, according to some embodiments;

[0034] FIG. 4 is a flowchart schematically representing an optional flow of operations for differential application of an execution attribute, according to some embodiments; and

[0035] FIG. 5 is a schematic block diagram of an instruction fetch circuitry, according to some embodiments.DETAILED DESCRIPTION

[0036] The following description focuses on computer instructions for accessing memory, and more specifically to load and store instructions, however methods as described herewithin may be applied to other computer instructions having execution attributes.

[0037] One example of a performance penalty when using an execution attribute is when using Memory-Tagging tag checking. A tagged access requires two reads from memory –one for data  and one for the tag. While memory tag checks are important for dynamic load and store instructions where an address of a memory access instruction is unpredictable at compile time, there is a high performance penalty in environments with random access to large memory, for example large memory mapped files and databases, in the worst case doubling memory bandwidth requirements. However, while code that uses the heap and heap related memory accesses are considered not safe, memory mapped files or libraries that undergo high quality assurance testing may be considered safe, and access to them might not have to be tagged. Eliminating tag checking from accesses to such memory can reduce the performance penalty of using Memory-Tagging tag checking.

[0038] Another limitation of coarse control of attribute application is related to security. Some security attacks on a computerized system include an attacker changing an address accessed by an instruction in a computer program. Using Memory-Taggingtag checking facilitates checking that an address accessed by an instruction is safe, to prevent an attacker from changing the address. However, when Memory-Tagging tag checking is controlled according to the accessed address, an attacker has an ability to control and disable checks that are done to detect a malicious attack and thus remove any security value of Memory-Taggingtag checking.

[0039] Some embodiments described in the present disclosure propose differential application of an execution attribute when executing a plurality of computer instructions. Differential application of the execution attribute allows reducing an amount of times the attribute is applied when not necessary by security requirements or a functionality of the plurality of computer instructions, thus increasing performance of the plurality of computer instructions in terms of throughput and latency. In addition, differential application of an attribute reduces an ability of an attacker to disable application of an attribute based on a memory address accessed by an instruction, thus increasing security of a system implemented accordingly.

[0040] To do so, in some embodiments described herewithin, the present disclosure proposes adding to a plurality of compiled computer instructions generated from a source code a mark that marks one or more marked instructions of the plurality of computer instructions and is added to the plurality of compiled computer instructions according to one or more programmer directives in the source code. Optionally, the one or more programmer directives are indicative of differential application of an identified execution attribute when executing at least some of the compiled computer instructions. Further in such embodiments, the present disclosure proposes configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions, and when executing the one or more marked  instructions applying the identified attribute to the one or more marked instructions according to the configured state of the processing circuitry.

[0041] The plurality of compiled computer instructions may be generated from the source code using a compiler. Optionally, the plurality of compiled computer instructions as generated manually, for example by optimizing another plurality of compiled instructions generated by a compiler. The mark may be added by the compiler when generating the plurality of compiled computer instructions. Optionally, the mark is added manually.

[0042] Optionally, each of the plurality of compiled instructions has an opcode selected from a plurality of operation codes and the identified execution attribute applies to an identified set of opcodes of the plurality of opcodes. For example, an attribute may apply to an identified set of opcodes for accessing memory, and not to other opcodes for arithmetic operations.

[0043] The present disclosure proposes in some embodiments to execute a first instruction of the one or more marked instructionsaccording to the identified attribute and execute a second instruction of the one or more marked instructions not according to the identified attribute, where both the first instruction and the second instruction are members of the identified set of opcodes. For example, in some embodiments the first instruction and the second instruction are memory access instructions and the identified attribute is Memory-Tagging tag checking. In this example, the first instruction is executed with Memory-Tagging tag checking and the second instruction is executed without Memory-Tagging tag checking.

[0044] Optionally, the one or more programmer directives apply to an identified part of the source code. For example, the one or more programmer directives may apply to a first part of the source code from which the first instruction was generated, indicative of a recommendation to apply the identified attribute when executing the first part of the source code, whereas the one or more programmer directives do not apply to a second part of the source code from which the second instruction was generated. Conversely, in another example one of the one or more programmer directives may apply to the entire source code indicative of a recommendation to apply the identified attribute when executing the source code, however another of the one or more programmer directives may apply to the second part of the source code from which the second instruction was generated, indicative of a recommendation to not apply the identified attribute when executing the second part of the source code.

[0045] Optionally, each instruction has a binary representation consisting of a plurality of binary bits. Optionally, adding the mark to the plurality of compiled instructions comprises modifying one or more bits in the plurality of binary bits of the binary representation of at least one of the  one or more marked instructions. The one or more bits may be unused bits of the binary representation. The one or more bits may be repurposed bits of the binary representation, where for another processing circuitry these repurposed bits have another use. Modifying one or more bits in the binary representation of an instruction allows controlling application of the identified attribute per instruction, increasing performance of a system executing the plurality of compiled instructions.

[0046] Optionally, adding the mark to the plurality of compiled instructions comprises replacing at least one of the one or more marked instructions with a dedicated computer instruction for executing according to the identified execution attribute, where the replaced at least one marked instruction is other than the at least one marked instruction where one or more bits were modified. Replacing a marked instruction with a dedicated computer instruction for executing according to the identified execution attribute allows controlling application of the identified attribute per instruction, increasing performance of a system executing the plurality of compiled instructions.

[0047] Optionally, adding the mark to the plurality of compiled instructions comprises inserting into the plurality of computer instructions one or more directive instructions, according to the one or more programmer directives. Optionally, the one or more directive instructionsare indicative of a desired differential application of the identified attribute when executing an identified part of the source code. For example, the directive instruction may be a start instruction, instructing a processing circuitry executing the plurality of compiled instructions to execute following instructions of the plurality of compiled instructions, executed after executing the directive instruction, according to the identified attribute. In another example, the directive instruction is an end instruction, instructing the processing circuitry to execute the following instructions according to the identified attribute. In yet another example, the directive instruction is a conditional-end start instruction, instructing the processing circuitry to execute the following instructions according to the identified execution attribute until identifying an end condition. Some examples of an end condition are execution of a branch instruction, identification of an interrupt or an exception signal, execution of an identified amount of instructions, and execution of an identified amount of instructions according to the identified execution attribute. In yet another example the directive instruction is a pattern start instruction comprising a pattern. The pattern start instruction optionally instructs the processing circuitry to execute some of the following instructions according to the identified execution attribute according to the pattern. An example of a pattern is a sequence of binary pattern bits, each associated with one of a sequence  of following instructions in order, such that a value of 1 is indicative of a directive to execute the respective associated instruction according to the identified attribute and a value of 0 is indicative of a directive to execute the respective associated instruction not according to the identified attribute.

[0048] Optionally, at least some of the plurality of computer instructions associated with the identified part of the source code are stored in a memory. In one example where the desired differential application of the identified attribute is to apply the identified attribute when executing the identified part of the source code, the one or more directive instructions comprise a range of addresses in memory storing the at least some compiled instructions associated with the identified part of the source code. In this example, when a processing circuitry executing the plurality of compiled instructions identifies that one or more instructions of the one or more markedinstructions are stored in the memory in the range of addresses, the processing circuitry executes the one or more instructions according to the identified execution attribute. Further in this example, when the processing circuitry identifies that one or more additional instructions of the plurality of computer instructions are not stored in the memory in the range of addresses, the processing circuitry executes the one or more additional instructions not according to the identified execution attribute.

[0049] In addition, according to some embodiments a state of the processing circuitry is configured to instruct the processing circuitry to not apply the identified execution attribute, for example in response to executing a directive instruction that is an end instruction, or in response to identifying an end condition of a directive instruction that is a conditional-end start instruction, for example identifying an interrupt signal. Some processing circuitry architectures support pipeline processing and branch prediction. Optionally, the state of the processing circuitry is configured to not apply the identified execution attribute in response to recovering from a wrong prediction of a branch instruction. Optionally, subject to recovery of the state of the processing circuitry, when recovering from a wrong prediction the state of the processing circuitry is not configured to not applythe identified execution attribute.

[0050] Optionally, the mark, marking the one or more marked instructions, is interpreted as a no-operation instructions (NOP) by one or more other processing circuitries when executing the plurality of compiled computer instructions. Interpreting the mark as a NOP by the one or more other processing circuitries allows the plurality of compiled computer instructions to be executed by processing circuitry that does not support differential application of the identified execution  attribute, increasing usability of the plurality of compiled computer instructions generated according to the present disclosure.

[0051] Before explaining at least one embodiment in detail, it is to be understood that embodimentsare not necessarily limited in its application to the details of construction and the arrangement of the components and / or methods set forth in the following description and / or illustrated in the drawings and / or the Examples. Implementations described herein are capable of other embodiments or of being practiced or carried out in various ways.

[0052] Embodiments may be a system, a method, and / or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the embodiments.

[0053] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM) , a read-only memory (ROM) , an erasable programmable read-only memory (EPROM or Flash memory) , a static random access memory (SRAM) , a portable compact disc read-only memory (CD-ROM) , a digital versatile disk (DVD) , a memory stick, a floppy disk, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable) , or electrical signals transmitted through a wire.

[0054] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the  network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0055] Computer readable program instructions for carrying out operations of embodiments may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code, natively compiled or compiled just-in-time (JIT) , written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, Java, Object-Oriented Fortran or the like, an interpreted programming language such as JavaScript, Python or the like, and conventional procedural programming languages, such as the "C" programming language, Fortran, or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN) , or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider) . In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA) , or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of embodiments.

[0056] Aspects of embodiments are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) , and computer program products according to embodiments. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0057] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other  devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function / act specified in the flowchart and / or block diagram block or blocks.

[0058] The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0059] The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function (s) . In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustration, and combinations of blocks in the block diagrams and / or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.

[0060] Reference is now made to FIG. 1, showing a schematic block diagram of an exemplary apparatus 100 and an exemplary device 110, according to some embodiments. In such embodiments, device 110 comprises processing circuitry 111 for executing a plurality of compiled computer instructions. Optionally, processing circuitry 111 comprises attribute application state 112 for controlling application of an identified execution attribute when executing the plurality of compiled computer instructions. Optionally, processing circuitry 111 comprises attribute-application counter 113, optionally for counting when the identified execution attribute is applied. Optionally, device 110 comprises a memory 114 connected to processing circuitry 111, optionally for the purpose of storing the plurality of compiled computer instructions executed by processing circuitry 111. Some examples of a memory are a random  access memory, a static random access memory, a dynamic random access memory, a non-volatile random access memory, a read-only memory, a flash memory, and an electrically erasable programmable read-only memory.

[0061] Optionally, apparatus 100 comprises processing unit 101, optionally for generating the plurality of compiled instructions. The processing unit may be any kind of programmable or non-programmable circuitry that is configured to carry out the operations described below. The processing unit may comprise hardware as well as software. For example, the processing unit may comprise one or more processors and a transitory or non-transitory memory that carries a program which causes the processing unit to perform the respective operations when the program is executed by the one or more processors.

[0062] Optionally, processing unit 101 is connected to device 110, optionally via a digital communication network interface 102 of processing unit 101. Optionally, processing unit 101 is connected to a non-volatile digital storage 103. Optionally, processing unit 101 provides the plurality of compiled computer instructions to device 110. Processing unit 101 may provide the plurality of compiled computer instructions to device 110 via digital communication network interface 102. Processing unit 101 may provide the plurality of compiled computer instructions to device 110 via non-volatile digital storage 103.

[0063] To execute a plurality of compiled computer instructions, in some embodiments device 110 implements the following optional method.

[0064] Reference is now made also to FIG. 2, showing a flowchart schematically representing an optional flow of operations 200 for executing a plurality of compiled computer instructions, according to some embodiments. In such embodiments, in 201 processing circuitry 111 identifies in a plurality of compiled computer instructions a mark that marks one or more marked instructions of the plurality of computer instructions. Optionally, the plurality of compiled computer instructions is generated from a source code. Optionally, the mark is added to the plurality of compiled computer instructions according to one or more programmer directives in the source code.

[0065] Optionally, the plurality of compiled computer instructions is generated by processing unit 101, optionally implementing the following method.

[0066] Reference is now made also to FIG. 3, showing a flowchart schematically representing an optional flow of operations 300 for generating a plurality of compile computer instructions, according to some embodiments. In such embodiments, in 301 processing unit 101 identifies in the source code the one or more programmer directives. Optionally, the one or more programmer  directives are indicative of differential enforcement of an identified execution attribute. Some examples of an execution attribute are a memory tagging attribute, for example ARM MTE and SPARC ADI, a requirement for synchronous exceptions, for example using ARM SDERR, and a transaction related attribute, for example ARM TME, SPARC TM and Intel TSX.

[0067] The one or more programmer directives may be a recommendation to execute a part of the source code according to the identified execution attribute, thus optionally the one or more programmer directives apply to the identified part of the source code. Optionally, the identified part of the source code is an identified source code instruction of the source code, for example when the recommendation is to execute one source level instruction according to the identified execution attribute. Optionally, the identified part of the source code is a plurality of source code instructions of the source code, for example when the recommendation is to execute a plurality of source level instructions according to the identified execution attribute. One example of a plurality of source level instructions is an execution block of the source code. Other examples include, but are not limited to, a function and a module. Optionally, the identified part of the source code is a plurality of source code instructions of the source code for performing a transaction operation, for example when the recommendation is to execute a transaction operation of the source code according to the identified execution attribute.

[0068] In 310, processing unit 101 optionally generates a plurality of compiled computer instructions using the source code. Optionally, generating the plurality of compiled computer instructions comprises compiling the source code. Optionally, generating the plurality of compiled computer instructions comprises marking one or more marked instructions of the plurality of computer instructions with a mark, according to the one or more programmer directives in the source code. Optionally, the mark is added to the plurality of compiled computer instructions.

[0069] Optionally, each of the plurality of compiled computer instructions has an operation code selected from a plurality of operation codes, for example from an instruction set of the processing circuitry. Optionally, the identified execution attribute applies to an identified set of operation codes of the plurality of operation codes, for example a set of memory access operation codes. Another example is a set of memory read or load instructions. Another example is a set of memory write or store instructions. Optionally, the one or more programmer directives are indicative of differential application of the identified execution attribute when executing at least some of the plurality of compiled computer instructions, where the at least some compiled computer instructions each has a respective operation code that is a member of the identified set  of operation codes. For example, the one or more programmer directives may be indicative of differential application of the identified execution attribute to a plurality of load instructions of the plurality of compiled computer instructions. In another example, the one or more programmer directives are indicative of differential application of the identified execution attribute to a plurality of memory accessinstructions, including load instructions and store instructions, of the plurality of compiled computer instructions.

[0070] Optionally, adding the mark to the plurality of compiled computer instructions comprises modifying one or more bits in a plurality of binary bits of a binary representation of at least one marked instruction of the one or more marked instructions.

[0071] Optionally, adding the mark comprises replacing at least one of at least one other marked instruction on the one or more marked instructions with a dedicated computer instruction for executing according to the identified execution attribute.

[0072] Optionally, adding the mark comprises inserting into the plurality of compiled computer instructions one or more directive instructions according to the one or more programmer directives. Optionally, the one or more directive instructions comprise a start instruction, where the start instruction is an instruction to execute following instructions of the plurality of compiled computer instructions according to the identified execution attribute. Optionally, the following instructions are a plurality of the compiled computer instructions executed after executing the start instruction.

[0073] Optionally, the one or more directive instructions comprise an end instruction, where the end instruction is an instruction to execute the following instructions of the plurality of compiled computer instructions not according to the identified execution attribute.

[0074] Optionally, the one or more directive instructions comprise a conditional-end start instruction, where the conditional-start instruction is an instruction to execute the following instructions of the plurality of compiled computer instructions according to the identified execution attribute until identifying an end condition. The end condition may be execution of a branch instruction. Other examples of an end condition include executing an identified amount of instructions, executing another identified amount of instructions according to the identified execution attribute, and identifying a signal such as an interrupt signal, an exception signal and a trap signal.

[0075] Optionally, the one or more directive instructions comprise a pattern start instruction comprising a pattern, where the pattern start instruction is an instruction to execute according to the pattern some of the following instructions of the plurality of compiled computer instructions  according to the identified execution attribute. The pattern optionally indicates which instructions, in the following instructions, to execute according to the identified execution attribute. The pattern may be a bit mask, i.e. a sequence of binary pattern bits, each associated with one of a sequence of following instructions in order, such that a value of 1 is indicative of a directive to execute the respective associated instruction according to the identified attribute and a value of 0 is indicative of a directive to execute the respective associated instruction not according to the identified attribute. Optionally, the pattern is indicative of a repetitive pattern comprising a first identified amount of instructions in the sequence of following instructions executed according to the identified attribute followed by a second identified amount of other instructions in the sequence of following instruction executed not according to the identified execution. Optionally, the pattern comprises a first number indicative of the first identified amount and additionally or alternatively a second number indicative of the second identified amount.

[0076] In 320, processing unit 101 optionally provides the plurality of compiled computer instructions to processing circuitry 111 for execution. Optionally, processing unit 101 stores the plurality of compiled computer instructions on non-volatile digital storage 103. Optionally, processing unit 101 sends the plurality of compiled computer instructions to processing circuitry 111 via digital communication network interface 102. Optionally, processing unit 101 provides the plurality of compiled computer instructions to another processing circuitry that interprets the mark, marking the one or more marked instructions as a NOP when executing the plurality of compiled computer instructions.

[0077] Reference is now made again to FIG. 2.

[0078] In 210 processing circuitry 111 configures attribute-application state 112 to apply the identified execution attribute to at least one of the one or more marked instructions. Optionally, processing circuitry 111 configures attribute-application state 112 in response to identifying the mark in 201. Optionally, the one or more programmer directives in the source code applies to an identified part of the source code. Optionally, the one or more directive instructions comprise a range of addresses in memory 114, where at least some of the plurality of compiled computer instructions that are associated with the identified part of the source code are stored in memory 114 in the range of addresses. Optionally, configuring attribute-application state 112 comprises configuring at least one register of processing circuitry 111 with the range of addresses. When the one or more directive instructions comprise a pattern start instruction comprising a pattern, configuring attribute-application state 112 optionally comprises configuring one or more other  registers of processing circuitry 111 with the pattern, for example with the sequence of binary pattern bits, and additionally or alternatively with one or more of the first number and the second number of the repetitive pattern. When the one or more directive instructions comprise a conditional-end start instruction, configuring attribute-application state 112 optionally comprises configuring one or more additional registers of processing circuitry with one or more values indicative of an end condition to identify, for example an identified amount of times to apply the identified execution attribute or a value indicative of the end condition including identification of a branch instruction.

[0079] When executing the one or more marked instructions, in 220 processing circuitry 111 optionally applies the identified execution attribute to the one or more marked instructions according to the configured state of attribute-application state 112. Optionally, the plurality of compiled computer instructions comprises two instructions to which the identified execution attribute could be applied, that is each of the two instructions has an operation code selected from the identified set of operation codes. Thus, the plurality of compiled computer instructions optionally comprises a first instruction having a first operation code and a second instruction having a second operation code, where the first operation code and the second operation code are both selected from the identified set of operation codes. Optionally, applying the identified execution attribute to the one or more marked instructions according to the configures state of attribute-application state 112 comprises executing the first instruction according to the identified execution attribute and executing the second instruction not according to the identified execution attribute. For example, when the one or more directive instructions comprise a conditional-start instruction with an end condition of an identified amount of times to apply the identified execution attribute, processing circuitry 111 executes the first instruction before applying the identified execution attribute the identified amount of times and processing circuitry 111 executes the second instruction after applying the identified execution attribute the identified amount of times. In another example, when the one or more directive instructions comprise a start instruction and an end instruction and processing circuitry 111 executes the first instruction after executing the end instruction but before executing the end instruction and executes the second instruction after executing the end instruction.

[0080] Optionally, when the one or more direction instructions comprise a range of addresses processing circuitry 111 implements the following method to apply the identified execution attribute to the one or more marked instructions according to the configured attribute-application state 112.

[0081] Reference is now made also to FIG. 4, showing a flowchart schematically representing an optional flow of operations 400 for differential application of an execution attribute, according to some embodiments. In such embodiments, in 410 processing circuitry 111 identifies that one or more computer instructions of the one or more marked instructions are stored in memory 114 in the range of addresses. In 412, processing circuitry 111 optionally execute the one or more computer instructions according to the identified execution attribute. Optionally, in 420 processing circuitry 111 identifies that one or more additional computer instructions of the one or more marked instructions are not stored in memory 114 in the range of addresses. In 422, processing circuitry 111 optionally execute the one or more additional computer instructions not according to the identified execution attribute.

[0082] Reference is now made again to FIG. 2. It may be the case that during execution of the plurality of compiled computer instructions a state pf processing circuitry 111 prohibits executing the one or more marked instructions according to the identified execution attribute, for example when failing to recover some of attribute-application state 112 after an interrupt. Optionally, applying the identified execution attribute according to the configures attribute-application state 112 comprises declining to execute the one or more marked instructions according to the identified execution attribute subject to identifying a prohibiting state of processing circuitry 111.

[0083] Optionally, in 212 processing circuitry 111 configures attribute-state 112 to not apply the identified execution attribute, for example in response to executing the end instruction. Optionally, processing circuitry 111 configures attribute-state 112 to not apply the identified execution attribute in response to recovering after a wrong prediction of a branch instruction executed by processing circuitry 111.

[0084] When the one or more direction instructions comprise a conditional-end start instruction Optionally, processing circuitry 111 optionally configures attribute-state 112 to not apply the identified execution attribute in response to identifying the end condition. Optionally, the conditional-end start instruction comprises an amount of times to apply the identified execution attribute. Optionally, when executing the plurality of compiled computer instructions processing circuitry 111 increments attribute-operation counter 113 when executing a computer instruction according to the identified execution attribute. Optionally, identifying the end condition comprises comparing attribute-operation counter 113 to the amount of times to apply the identified execution attribute. Optionally, identifying the end condition comprises identifying a  branch instruction, for example execution of a branch instruction. Optionally, identifying the end condition comprises identifying an interrupt, an exception or a trap.

[0085] Optionally, processing circuitry 111 comprises an instruction fetch circuitry. Optionally, the instruction fetch circuitry implements at least part of method 200.

[0086] Reference is now made also to FIG. 5, showing a schematic block diagram of an instruction fetch circuitry 500, according to some embodiments. In such embodiments, in each of a plurality of iterations instructions fetch 501 fetches a compiled computer instruction, for example from memory 114. Optionally, decode 510 decodes the compiled computer instruction and optionally attaches the identified execution attribute to the compiled computer instruction according to attribute-application state 112. Further in instruction fetch circuitry, dispatch 530 dispatches the compiled computer instruction with the attached identified execution attribute to instruction queue 540, where the compiled computer instruction is further passed to an execution unit 560 and additionally or alternatively to an address generation unit 550. Optionally execution unit 560, and additionally or alternatively address generation unit 550, execute the compiled computer instruction according to the attached identified execution attribute when attached, otherwise not according to the attached identified execution attribute.

[0087] The descriptions of the various embodiments have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

[0088] It is expected that during the life of a patent maturing from this application many relevant execution attributes, marks, and programmer directives will be developed and the scope of the terms “execution attribute” , mark, and “programmer directive” is intended to include all such new technologies a priori.

[0089] As used herein the term “about” refers to ± 10 %.

[0090] The terms "comprises" , "comprising" , "includes" , "including" , “having” and their conjugates mean "including but not limited to" . This term encompasses the terms "consisting of" and "consisting essentially of" .

[0091] The phrase "consisting essentially of" means that the composition or method may include additional ingredients and / or steps, but only if the additional ingredients and / or steps do not materially alter the basic and novel characteristics of the claimed composition or method.

[0092] As used herein, the singular form "a" , "an" and "the" include plural references unless the context clearly dictates otherwise. For example, the term "a compound" or "at least one compound" may include a plurality of compounds, including mixtures thereof.

[0093] The word “exemplary” is used herein to mean “serving as an example, instance or illustration” . Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments and / or to exclude the incorporation of features from other embodiments.

[0094] The word “optionally” is used herein to mean “is provided in some embodiments and not provided in other embodiments” . Any particular embodiment may include a plurality of “optional” features unless such features conflict.

[0095] Throughout this application, various embodiments may be presented in a range format. It should be understood that the description in range format is merely for convenience and brevity and should not be construed as an inflexible limitation on the scope of embodiments. Accordingly, the description of a range should be considered to have specifically disclosed all the possible subranges as well as individual numerical values within that range. For example, description of a range such as from 1 to 6 should be considered to have specifically disclosed subranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6 etc., as well as individual numbers within that range, for example, 1, 2, 3, 4, 5, and 6. This applies regardless of the breadth of the range.

[0096] Whenever a numerical range is indicated herein, it is meant to include any cited numeral (fractional or integral) within the indicated range. The phrases “ranging / ranges between” a first indicate number and a second indicate number and “ranging / ranges from” a first indicate number “to” a second indicate number are used herein interchangeably and are meant to include the first and second indicated numbers and all the fractional and integral numerals therebetween.

[0097] It is appreciated that certain features of embodiments, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features of embodiments, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable subcombination or as suitable in any other described embodiment. Certain features described in  the context of various embodiments are not to be considered essential features of those embodiments, unless the embodiment is inoperative without those elements.

[0098] Although embodiments have been described in conjunction with specific embodiments thereof, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art. Accordingly, it is intended to embrace all such alternatives, modifications and variations that fall within the spirit and broad scope of the appended claims.

[0099] It is the intent of the applicant (s) that all publications, patents and patent applications referred to in this specification are to be incorporated in their entirety by reference into the specification, as if each individual publication, patent or patent application was specifically and individually noted when referenced that it is to be incorporated herein by reference. In addition, citation or identification of any reference in this application shall not be construed as an admission that such reference is available as prior art to the present invention. To the extent that section headings are used, they should not be construed as necessarily limiting. In addition, any priority document (s) of this application is / are hereby incorporated herein by reference in its / their entirety.

Claims

1.A device comprising processing circuitry adapted for executing a plurality of compiled computer instructions, comprising:identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code;in response to identifying the mark, configuring a state of the processing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.2.The device of claim 1, wherein each of the plurality of compiled computer instructions has an operation code selected from a plurality of operation codes;wherein the identified execution attribute applies to an identified set of operation codes of the plurality of operation codes; andwherein the at least one programmer directive is indicative of differential application of the identified execution attribute when executing at least some of the plurality of compiled computer instructions, each having a respective operation code that is a member of the identified set of operation codes.3.The device of claim 2, wherein the plurality of compiled computer instructions comprises a first instruction having a first operation code selected from the identified set of operation codes, and a second instruction having a second operation code selected from the identified set of operation codes;wherein applying the identified execution attribute to the one or more marked instruction according to the configured state of the processing circuitry comprises:executing the first instruction according to the identified execution attribute; andexecuting the second instruction not according to the identified execution attribute.4.The device of any of claims 1-3, wherein the at least one programmer directive applies to an identified part of the source code.5.The device of claim 4, wherein the identified part of the source code is an identified source code instruction of the source code.6.The device of claim 4, wherein the identified part of the source code is a plurality of source code instructions of the source code.7.The device of claim 4, wherein the identified part of the source code is another plurality of source code instructions for performing a transaction operation.8.The device of any of claims 1-7, wherein the mark is added to the plurality of compiled computer instructions, comprising at least one of:modifying one or more bits in a plurality of binary bits of a binary representation of at least one marked instruction of the one or more marked instructions;replacing at least one of at least one other marked instruction of the one or more marked instructions with a dedicated computer instruction for executing according to the identified execution attribute; andinserting into the plurality of compiled computer instructions at least one directive instruction, according to the at least one programmer directive.9.The device of claim 8, further comprising a memory, connected to the processing circuitry, storing the plurality of compiled computer instructions;wherein the at least one programmer directive applies to an identified part of the source code;wherein the at least one directive instruction comprises a range of addresses in the memory storing at least some of the plurality of compiled computer instructions associated with the identified part of the source code; andwherein configuring the state of the processing circuitry comprises configuring at least one register of the processing circuitry with the range of addresses.10.The device of claim 9, wherein applying the identified execution attribute to the one or more marked instructions according to the configured state of the processing circuitry comprises:identifying that at least one computer instruction of the one or more marked instructions is stored in the memory in the range of addresses; andexecuting the at least onecomputer instruction according to the identified execution attribute.11.The device of claim 10, wherein applying the identified execution attribute to the one or more marked instructions according to the configured state of the processing circuitry further comprises:identifying at least one additional computer instruction that is not stored in the memory in the range of addresses; andexecuting the at least one additional computer instruction not according to the identified execution attribute.12.The device of any of claims 8-11, wherein the at least one directive instruction comprises at least one of:a start instruction to execute following instructions of the plurality of compiled computer instructions according to the identified execution attribute;an end instruction to execute following instructions of the plurality of compiled computer instructions not according to the identified execution attribute;a conditional-end start instruction to execute following instructions of the plurality of compiled computer instructions according to the identified execution attribute until identifying an end condition; anda pattern start instruction, comprising a pattern, to execute according to the pattern some following instructions of the plurality of compiled computer instructions according to the identified execution attribute.13.The device of claim 12, wherein the processing circuitry is further adapted for configuring the state of the processing unit to not apply the identified execution attribute, in response to at least one of:executing the end instruction;identifying the end condition; andrecovering after a wrong prediction of a branch instruction.14.The device of claim 13, wherein the conditional-end start instruction comprises an amount of times to apply the identified execution attribute;wherein the processing circuitry further comprises an attribute-application counter;wherein when executing the plurality of compiled computer instructions, the processing circuitry increases the attribute-application counter when executing a computer instruction according to the identified execution attribute; andwherein identifying the end condition comprises comparing the attribute application counter to the amount of times to apply the identified execution attribute.15.The device of any of claims 12-14, wherein identifying the end condition comprises identifying at least one of a branch instruction, an interrupt, an exception and a trap.16.The device of any of claims 1-15, wherein applying the identified execution attribute according to the configured state of the processing circuitry further comprises declining to execute the one or more marked instructions according to the identified execution attribute subject to identifying a prohibiting state of the processing circuitry.17.The device of any of claims 1-16, wherein the identified execution attribute is one of: a memory tagging attribute, a requirement for synchronous exceptions, and a transaction related attribute.18.A method for executing a plurality of computer instructions, comprising:identifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code;in response to identifying the mark, configuring a state of aprocessing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.19.A software program product for executing a plurality of compiled computer instructions, comprising:a non-transitory computer readable storage medium;first program instructions foridentifying in a plurality of compiled computer instructions, generated from a source code, a mark marking one or more marked instructions of the plurality of compiled computer instructions, where the mark is added to the plurality of compiled computer instructions according to at least one programmer directive in the source code;second program instructions for in response to identifying the mark, configuring a state of aprocessing circuitry to apply an identified execution attribute to at least one of the one or more marked instructions; andthird program instructions for when executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry;wherein the first, second, and third program instructions are executed by at least one computerized processor from the non-transitory computer readable storage medium.20.An apparatus for generating a plurality of compiled computer instructions, comprising a processing unit adapted for:identifying in a source codeat least one programmer directive indicative of differential enforcement of an identified execution attribute;generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least one programmer directive in the source code; andproviding the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising:identifying the mark in the plurality of compiled computer instructions;in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.21.The apparatus of claim 20, wherein the mark, marking the one or more marked instructions, is interpreted as a no-operation instructions (NOP) by at least one other processing circuitry when executing the plurality of compiled computer instructions.22.A method for generating a plurality of compiled computer instructions, comprising:identifying in a source codeat least one programmer directive indicative of differential enforcement of an identified execution attribute;generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least one programmer directive in the source code; andproviding the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising:identifying the mark in the plurality of compiled computer instructions;in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry.23.A software program product for generating a plurality of compiled computer instructions, comprising:a non-transitory computer readable storage medium;first program instructions for identifying in a source codeat least one programmer directive indicative of differential enforcement of an identified execution attribute;second program instructions for generating a plurality of compiled computer instructions using the source code comprising marking one or more marked instructions of the plurality of compiled computer instructions with a mark according to at least one programmer directive in the source code; andthird program instructions for providing the plurality of compiled computer instructions to a processing circuitry for execution, said execution comprising:identifying the mark in the plurality of compiled computer instructions;in response to identifying the mark, configuring a state of a processing circuitry to apply the identified execution attribute to at least one of the one or more marked instructions; andwhen executing the one or more marked instructions, applying the identified execution attribute thereto according to the configured state of the processing circuitry;wherein the first, second and third program instructions are executed by at least one computerized processor from the non-transitory computer readable storage medium.

Citation Information

Patent Citations

  • Hybrid atomicity support for a binary translation based microprocessor

    US20180285112A1

  • Systems, methods, and apparatuses for heterogeneous computing

    US20190347125A1

  • Multi-core memory model and speculative mode processor management

    US9619301B2