Skip to content

Commit

Permalink
Fix typo in #encodeValue:accoringTo:
Browse files Browse the repository at this point in the history
  • Loading branch information
janvrany authored and shingarov committed Sep 4, 2024
1 parent 9f4884c commit 790dbe3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/ArchC-Core/AcAsmSyntax.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ AcAsmSyntax >> assembler [
allOperands := actualOperands copy addAll: constraints; yourself.
fieldValues := Dictionary new.
allOperands keysAndValuesDo: [ :opDef :v |
fieldValues addAll: (opDef asOperandInstantiation encodeValue: v accoringTo: instruction format) ].
fieldValues addAll: (opDef asOperandInstantiation encodeValue: v
accordingTo: instruction format) ].
self instruction inEnvironment: fieldValues ]

]

{ #category : #accessing }
Expand Down
2 changes: 1 addition & 1 deletion src/ArchC-Core/AsmOperandInstantiation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ AsmOperandInstantiation >> encodeSimpleValue: value [
]

{ #category : #private }
AsmOperandInstantiation >> encodeValue: value accoringTo: format [
AsmOperandInstantiation >> encodeValue: value accordingTo: format [
value isAcAsmOperandModifier ifTrue: [
^ value encodeInFields: self accordingTo: format
] ifFalse: [
Expand Down
11 changes: 6 additions & 5 deletions src/ArchC-DSL/AcAsmSyntax.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ AcAsmSyntax >> assembleDSL: mnemonic operands: operandList [
| operandDef |

operandDef := self operands at: operandIdx.
environment addAll: (operandDef asOperandInstantiation encodeValue: operandValue accoringTo: instruction format).
environment addAll: (operandDef asOperandInstantiation encodeValue: operandValue
accordingTo: instruction format).
operandIdx := operandIdx + 1.
].
].
Expand All @@ -36,9 +37,9 @@ AcAsmSyntax >> assembleDSL: mnemonic operands: operandList [
baseMod := operandFormat base modifier.

environment addAll: (offsetDef asOperandInstantiation encodeValue: (offsetMod new x: operandValue offset)
accoringTo: instruction format).
accordingTo: instruction format).
environment addAll: (baseDef asOperandInstantiation encodeValue: (baseMod new x: operandValue base)
accoringTo: instruction format).
accordingTo: instruction format).

operandIdx := operandIdx + 2.
] ifFalse: [
Expand All @@ -48,7 +49,7 @@ AcAsmSyntax >> assembleDSL: mnemonic operands: operandList [
operandModifier := operandFormat modifier.

environment addAll: (operandDef asOperandInstantiation encodeValue: (operandModifier new x: operandValue)
accoringTo: instruction format).
accordingTo: instruction format).

operandIdx := operandIdx + 1.
].
Expand All @@ -57,7 +58,7 @@ AcAsmSyntax >> assembleDSL: mnemonic operands: operandList [

self constraints keysAndValuesDo: [:operandDef :operand |
environment addAll: (operandDef asOperandInstantiation encodeValue: operand
accoringTo: instruction format)
accordingTo: instruction format)
].
^self instruction inEnvironment: environment
]

0 comments on commit 790dbe3

Please sign in to comment.