| поискавой системы для электроныых деталей |
|
PM0056 датащи(PDF) 82 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0056 датащи(HTML) 82 Page - STMicroelectronics |
|
82 / 156 page ![]() The Cortex-M3 instruction set PM0056 82/156 DocID15491 Rev 5 REVSH R0, R5 ; reverse Signed Halfword REVHS R3, R7 ; reverse with Higher or Same condition RBIT R7, R8 ; reverse bit order of value in R8 and write the result to R7 3.5.9 TST and TEQ Test bits and test equivalence. Syntax TST{cond} Rn, Operand2 TEQ{cond} Rn, Operand2 where: • ‘cond’ is an optional condition code (see Conditional execution on page 57) • ‘Rn’ is the register holding the first operand • ‘Operand2’ is a flexible second operand (see Flexible second operand on page 52) for details of the options. Operation These instructions test the value in a register against operand2. They update the condition flags based on the result, but do not write the result to a register. The TST instruction performs a bitwise AND operation on the value in Rn and the value of operand2. This is the same as the ANDS instruction, except that it discards the result. To test whether a bit of Rn is 0 or 1, use the TST instruction with an operand2 constant that has that bit set to 1 and all other bits cleared to 0. The TEQ instruction performs a bitwise exclusive OR operation on the value in Rn and the value of operand2. This is the same as the EORS instruction, except that it discards the result. Use the TEQ instruction to test if two values are equal without affecting the V or C flags. TEQ is also useful for testing the sign of a value. After the comparison, the N flag is the logical exclusive OR of the sign bits of the two operands. Restrictions Do not use either SP or PC. Condition flags These instructions: • Update the N and Z flags according to the result • Can update the C flag during the calculation of operand2 (see Flexible second operand on page 52). • Do not affect the V flag Examples TSTR0, #0x3F8; perform bitwise AND of R0 value to 0x3F8, ; APSR is updated but result is discarded TEQEQR10, R9; conditionally test if value in R10 is equal to ; value in R9, APSR is updated but result is discarded |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |