2 % (c) The AQUA Project, Glasgow University, 1993-1998
6 module StixPrim ( primCode, amodeToStix, amodeToStix' ) where
8 #include "HsVersions.h"
14 import AbsCSyn hiding ( spRel )
15 import AbsCUtils ( getAmodeRep, mixedTypeLocn )
16 import SMRep ( fixedHdrSize )
17 import Literal ( Literal(..), word2IntLit )
18 import PrimOp ( PrimOp(..), CCall(..), CCallTarget(..) )
19 import PrimRep ( PrimRep(..), isFloatingRep )
20 import UniqSupply ( returnUs, thenUs, getUniqueUs, UniqSM )
21 import Constants ( mIN_INTLIKE, mIN_CHARLIKE, uF_UPDATEE, bLOCK_SIZE,
22 rESERVED_STACK_WORDS )
23 import CLabel ( mkIntlikeClosureLabel, mkCharlikeClosureLabel,
24 mkMAP_FROZEN_infoLabel, mkForeignLabel )
27 import Char ( ord, isAlpha, isDigit )
32 The main honcho here is primCode, which handles the guts of COpStmts.
36 :: [CAddrMode] -- results
38 -> [CAddrMode] -- args
39 -> UniqSM StixTreeList
42 First, the dreaded @ccall@. We can't handle @casm@s.
44 Usually, this compiles to an assignment, but when the left-hand side
45 is empty, we just perform the call and ignore the result.
47 btw Why not let programmer use casm to provide assembly code instead
50 The (MP) integer operations are a true nightmare. Since we don't have
51 a convenient abstract way of allocating temporary variables on the (C)
52 stack, we use the space just below HpLim for the @MP_INT@ structures,
53 and modify our heap check accordingly.
56 -- NB: ordering of clauses somewhere driven by
57 -- the desire to getting sane patt-matching behavior
58 primCode res@[sr,dr] IntegerNegOp arg@[sa,da]
59 = gmpNegate (sr,dr) (sa,da)
61 primCode [res] IntegerCmpOp args@[sa1,da1, sa2,da2]
62 = gmpCompare res (sa1,da1, sa2,da2)
64 primCode [res] IntegerCmpIntOp args@[sa1,da1,ai]
65 = gmpCompareInt res (sa1,da1,ai)
67 primCode [res] Integer2IntOp arg@[sa,da]
68 = gmpInteger2Int res (sa,da)
70 primCode [res] Integer2WordOp arg@[sa,da]
71 = gmpInteger2Word res (sa,da)
73 primCode [res] Int2AddrOp [arg]
74 = simpleCoercion AddrRep res arg
76 primCode [res] Addr2IntOp [arg]
77 = simpleCoercion IntRep res arg
79 primCode [res] Int2WordOp [arg]
80 = simpleCoercion IntRep{-WordRep?-} res arg
82 primCode [res] Word2IntOp [arg]
83 = simpleCoercion IntRep res arg
87 primCode [res] SameMutableArrayOp args
89 compare = StPrim AddrEqOp (map amodeToStix args)
90 assign = StAssign IntRep (amodeToStix res) compare
92 returnUs (\xs -> assign : xs)
94 primCode res@[_] SameMutableByteArrayOp args
95 = primCode res SameMutableArrayOp args
97 primCode res@[_] SameMutVarOp args
98 = primCode res SameMutableArrayOp args
100 primCode res@[_] SameMVarOp args
101 = primCode res SameMutableArrayOp args
104 Freezing an array of pointers is a double assignment. We fix the
105 header of the ``new'' closure because the lhs is probably a better
106 addressing mode for the indirection (most likely, it's a VanillaReg).
110 primCode [lhs] UnsafeFreezeArrayOp [rhs]
112 lhs' = amodeToStix lhs
113 rhs' = amodeToStix rhs
114 header = StInd PtrRep lhs'
115 assign = StAssign PtrRep lhs' rhs'
116 freeze = StAssign PtrRep header mutArrPtrsFrozen_info
118 returnUs (\xs -> assign : freeze : xs)
120 primCode [lhs] UnsafeFreezeByteArrayOp [rhs]
121 = simpleCoercion PtrRep lhs rhs
124 Returning the size of (mutable) byte arrays is just
125 an indexing operation.
128 primCode [lhs] SizeofByteArrayOp [rhs]
130 lhs' = amodeToStix lhs
131 rhs' = amodeToStix rhs
132 sz = StIndex IntRep rhs' fixedHS
133 assign = StAssign IntRep lhs' (StInd IntRep sz)
135 returnUs (\xs -> assign : xs)
137 primCode [lhs] SizeofMutableByteArrayOp [rhs]
139 lhs' = amodeToStix lhs
140 rhs' = amodeToStix rhs
141 sz = StIndex IntRep rhs' fixedHS
142 assign = StAssign IntRep lhs' (StInd IntRep sz)
144 returnUs (\xs -> assign : xs)
148 Most other array primitives translate to simple indexing.
151 primCode lhs@[_] IndexArrayOp args
152 = primCode lhs ReadArrayOp args
154 primCode [lhs] ReadArrayOp [obj, ix]
156 lhs' = amodeToStix lhs
157 obj' = amodeToStix obj
159 base = StIndex IntRep obj' arrPtrsHS
160 assign = StAssign PtrRep lhs' (StInd PtrRep (StIndex PtrRep base ix'))
162 returnUs (\xs -> assign : xs)
164 primCode [] WriteArrayOp [obj, ix, v]
166 obj' = amodeToStix obj
169 base = StIndex IntRep obj' arrPtrsHS
170 assign = StAssign PtrRep (StInd PtrRep (StIndex PtrRep base ix')) v'
172 returnUs (\xs -> assign : xs)
174 primCode [] WriteForeignObjOp [obj, v]
176 obj' = amodeToStix obj
178 obj'' = StIndex AddrRep obj' (StInt 4711) -- fixedHS
179 assign = StAssign AddrRep (StInd AddrRep obj'') v'
181 returnUs (\xs -> assign : xs)
183 -- NB: indexing in "pk" units, *not* in bytes (WDP 95/09)
184 primCode ls IndexByteArrayOp_Char rs = primCode_ReadByteArrayOp Int8Rep ls rs
185 primCode ls IndexByteArrayOp_Int rs = primCode_ReadByteArrayOp IntRep ls rs
186 primCode ls IndexByteArrayOp_Word rs = primCode_ReadByteArrayOp WordRep ls rs
187 primCode ls IndexByteArrayOp_Addr rs = primCode_ReadByteArrayOp AddrRep ls rs
188 primCode ls IndexByteArrayOp_Float rs = primCode_ReadByteArrayOp FloatRep ls rs
189 primCode ls IndexByteArrayOp_Double rs = primCode_ReadByteArrayOp DoubleRep ls rs
190 primCode ls IndexByteArrayOp_StablePtr rs = primCode_ReadByteArrayOp StablePtrRep ls rs
191 primCode ls IndexByteArrayOp_Int64 rs = primCode_ReadByteArrayOp Int64Rep ls rs
192 primCode ls IndexByteArrayOp_Word64 rs = primCode_ReadByteArrayOp Word64Rep ls rs
194 primCode ls ReadByteArrayOp_Char rs = primCode_ReadByteArrayOp Int8Rep ls rs
195 primCode ls ReadByteArrayOp_Int rs = primCode_ReadByteArrayOp IntRep ls rs
196 primCode ls ReadByteArrayOp_Word rs = primCode_ReadByteArrayOp WordRep ls rs
197 primCode ls ReadByteArrayOp_Addr rs = primCode_ReadByteArrayOp AddrRep ls rs
198 primCode ls ReadByteArrayOp_Float rs = primCode_ReadByteArrayOp FloatRep ls rs
199 primCode ls ReadByteArrayOp_Double rs = primCode_ReadByteArrayOp DoubleRep ls rs
200 primCode ls ReadByteArrayOp_StablePtr rs = primCode_ReadByteArrayOp StablePtrRep ls rs
201 primCode ls ReadByteArrayOp_Int64 rs = primCode_ReadByteArrayOp Int64Rep ls rs
202 primCode ls ReadByteArrayOp_Word64 rs = primCode_ReadByteArrayOp Word64Rep ls rs
204 primCode ls ReadOffAddrOp_Char rs = primCode_IndexOffAddrOp Int8Rep ls rs
205 primCode ls ReadOffAddrOp_Int rs = primCode_IndexOffAddrOp IntRep ls rs
206 primCode ls ReadOffAddrOp_Word rs = primCode_IndexOffAddrOp WordRep ls rs
207 primCode ls ReadOffAddrOp_Addr rs = primCode_IndexOffAddrOp AddrRep ls rs
208 primCode ls ReadOffAddrOp_Float rs = primCode_IndexOffAddrOp FloatRep ls rs
209 primCode ls ReadOffAddrOp_Double rs = primCode_IndexOffAddrOp DoubleRep ls rs
210 primCode ls ReadOffAddrOp_StablePtr rs = primCode_IndexOffAddrOp StablePtrRep ls rs
211 primCode ls ReadOffAddrOp_Int64 rs = primCode_IndexOffAddrOp Int64Rep ls rs
212 primCode ls ReadOffAddrOp_Word64 rs = primCode_IndexOffAddrOp Word64Rep ls rs
214 primCode ls IndexOffAddrOp_Char rs = primCode_IndexOffAddrOp Int8Rep ls rs
215 primCode ls IndexOffAddrOp_Int rs = primCode_IndexOffAddrOp IntRep ls rs
216 primCode ls IndexOffAddrOp_Word rs = primCode_IndexOffAddrOp WordRep ls rs
217 primCode ls IndexOffAddrOp_Addr rs = primCode_IndexOffAddrOp AddrRep ls rs
218 primCode ls IndexOffAddrOp_Float rs = primCode_IndexOffAddrOp FloatRep ls rs
219 primCode ls IndexOffAddrOp_Double rs = primCode_IndexOffAddrOp DoubleRep ls rs
220 primCode ls IndexOffAddrOp_StablePtr rs = primCode_IndexOffAddrOp StablePtrRep ls rs
221 primCode ls IndexOffAddrOp_Int64 rs = primCode_IndexOffAddrOp Int64Rep ls rs
222 primCode ls IndexOffAddrOp_Word64 rs = primCode_IndexOffAddrOp Word64Rep ls rs
224 primCode ls IndexOffForeignObjOp_Char rs = primCode_IndexOffForeignObjOp Int8Rep ls rs
225 primCode ls IndexOffForeignObjOp_Int rs = primCode_IndexOffForeignObjOp IntRep ls rs
226 primCode ls IndexOffForeignObjOp_Word rs = primCode_IndexOffForeignObjOp WordRep ls rs
227 primCode ls IndexOffForeignObjOp_Addr rs = primCode_IndexOffForeignObjOp AddrRep ls rs
228 primCode ls IndexOffForeignObjOp_Float rs = primCode_IndexOffForeignObjOp FloatRep ls rs
229 primCode ls IndexOffForeignObjOp_Double rs = primCode_IndexOffForeignObjOp DoubleRep ls rs
230 primCode ls IndexOffForeignObjOp_StablePtr rs = primCode_IndexOffForeignObjOp StablePtrRep ls rs
231 primCode ls IndexOffForeignObjOp_Int64 rs = primCode_IndexOffForeignObjOp Int64Rep ls rs
232 primCode ls IndexOffForeignObjOp_Word64 rs = primCode_IndexOffForeignObjOp Word64Rep ls rs
234 primCode ls WriteOffAddrOp_Char rs = primCode_WriteOffAddrOp Int8Rep ls rs
235 primCode ls WriteOffAddrOp_Int rs = primCode_WriteOffAddrOp IntRep ls rs
236 primCode ls WriteOffAddrOp_Word rs = primCode_WriteOffAddrOp WordRep ls rs
237 primCode ls WriteOffAddrOp_Addr rs = primCode_WriteOffAddrOp AddrRep ls rs
238 primCode ls WriteOffAddrOp_Float rs = primCode_WriteOffAddrOp FloatRep ls rs
239 primCode ls WriteOffAddrOp_Double rs = primCode_WriteOffAddrOp DoubleRep ls rs
240 primCode ls WriteOffAddrOp_StablePtr rs = primCode_WriteOffAddrOp StablePtrRep ls rs
241 primCode ls WriteOffAddrOp_Int64 rs = primCode_WriteOffAddrOp Int64Rep ls rs
242 primCode ls WriteOffAddrOp_Word64 rs = primCode_WriteOffAddrOp Word64Rep ls rs
244 primCode ls WriteByteArrayOp_Char rs = primCode_WriteByteArrayOp Int8Rep ls rs
245 primCode ls WriteByteArrayOp_Int rs = primCode_WriteByteArrayOp IntRep ls rs
246 primCode ls WriteByteArrayOp_Word rs = primCode_WriteByteArrayOp WordRep ls rs
247 primCode ls WriteByteArrayOp_Addr rs = primCode_WriteByteArrayOp AddrRep ls rs
248 primCode ls WriteByteArrayOp_Float rs = primCode_WriteByteArrayOp FloatRep ls rs
249 primCode ls WriteByteArrayOp_Double rs = primCode_WriteByteArrayOp DoubleRep ls rs
250 primCode ls WriteByteArrayOp_StablePtr rs = primCode_WriteByteArrayOp StablePtrRep ls rs
251 primCode ls WriteByteArrayOp_Int64 rs = primCode_WriteByteArrayOp Int64Rep ls rs
252 primCode ls WriteByteArrayOp_Word64 rs = primCode_WriteByteArrayOp Word64Rep ls rs
256 ToDo: saving/restoring of volatile regs around ccalls.
259 primCode lhs (CCallOp (CCall (StaticTarget fn) is_asm may_gc cconv)) rhs
260 | is_asm = error "ERROR: Native code generator can't handle casm"
261 | not may_gc = returnUs (\xs -> ccall : xs)
263 save_thread_state `thenUs` \ save ->
264 load_thread_state `thenUs` \ load ->
265 getUniqueUs `thenUs` \ uniq ->
267 id = StReg (StixTemp uniq IntRep)
269 suspend = StAssign IntRep id
270 (StCall SLIT("suspendThread") cconv IntRep [stgBaseReg])
271 resume = StCall SLIT("resumeThread") cconv VoidRep [id]
273 returnUs (\xs -> save (suspend : ccall : resume : load xs))
276 args = map amodeCodeForCCall rhs
277 amodeCodeForCCall x =
278 let base = amodeToStix' x
280 case getAmodeRep x of
281 ArrayRep -> StIndex PtrRep base arrPtrsHS
282 ByteArrayRep -> StIndex IntRep base arrWordsHS
283 ForeignObjRep -> StIndex PtrRep base fixedHS
287 [] -> StCall fn cconv VoidRep args
289 let lhs' = amodeToStix lhs
290 pk = case getAmodeRep lhs of
292 DoubleRep -> DoubleRep
295 StAssign pk lhs' (StCall fn cconv pk args)
298 DataToTagOp won't work for 64-bit archs, as it is.
301 primCode [lhs] DataToTagOp [arg]
302 = let lhs' = amodeToStix lhs
303 arg' = amodeToStix arg
304 infoptr = StInd PtrRep arg'
305 word_32 = StInd WordRep (StIndex PtrRep infoptr (StInt (-1)))
306 masked_le32 = StPrim SrlOp [word_32, StInt 16]
307 masked_be32 = StPrim AndOp [word_32, StInt 65535]
308 #ifdef WORDS_BIGENDIAN
313 assign = StAssign IntRep lhs' masked
315 returnUs (\xs -> assign : xs)
318 MutVars are pretty simple.
319 #define writeMutVarzh(a,v) (P_)(((StgMutVar *)(a))->var)=(v)
322 primCode [] WriteMutVarOp [aa,vv]
323 = let aa_s = amodeToStix aa
324 vv_s = amodeToStix vv
325 var_field = StIndex PtrRep aa_s fixedHS
326 assign = StAssign PtrRep (StInd PtrRep var_field) vv_s
328 returnUs (\xs -> assign : xs)
330 primCode [rr] ReadMutVarOp [aa]
331 = let aa_s = amodeToStix aa
332 rr_s = amodeToStix rr
333 var_field = StIndex PtrRep aa_s fixedHS
334 assign = StAssign PtrRep rr_s (StInd PtrRep var_field)
336 returnUs (\xs -> assign : xs)
339 Now the more mundane operations.
344 lhs' = map amodeToStix lhs
345 rhs' = map amodeToStix' rhs
346 pk = getAmodeRep (head lhs)
348 returnUs (\ xs -> simplePrim pk lhs' op rhs' : xs)
351 Helper fns for some array ops.
354 primCode_ReadByteArrayOp pk [lhs] [obj, ix]
356 lhs' = amodeToStix lhs
357 obj' = amodeToStix obj
359 base = StIndex IntRep obj' arrWordsHS
360 assign = StAssign pk lhs' (StInd pk (StIndex pk base ix'))
362 returnUs (\xs -> assign : xs)
365 primCode_IndexOffAddrOp pk [lhs] [obj, ix]
367 lhs' = amodeToStix lhs
368 obj' = amodeToStix obj
370 assign = StAssign pk lhs' (StInd pk (StIndex pk obj' ix'))
372 returnUs (\xs -> assign : xs)
375 primCode_IndexOffForeignObjOp pk [lhs] [obj, ix]
377 lhs' = amodeToStix lhs
378 obj' = amodeToStix obj
380 obj'' = StIndex AddrRep obj' fixedHS
381 assign = StAssign pk lhs' (StInd pk (StIndex pk obj'' ix'))
383 returnUs (\xs -> assign : xs)
386 primCode_WriteOffAddrOp pk [] [obj, ix, v]
388 obj' = amodeToStix obj
391 assign = StAssign pk (StInd pk (StIndex pk obj' ix')) v'
393 returnUs (\xs -> assign : xs)
396 primCode_WriteByteArrayOp pk [] [obj, ix, v]
398 obj' = amodeToStix obj
401 base = StIndex IntRep obj' arrWordsHS
402 assign = StAssign pk (StInd pk (StIndex pk base ix')) v'
404 returnUs (\xs -> assign : xs)
413 -> UniqSM StixTreeList
415 simpleCoercion pk lhs rhs
416 = returnUs (\xs -> StAssign pk (amodeToStix lhs) (amodeToStix rhs) : xs)
419 Here we try to rewrite primitives into a form the code generator can
420 understand. Any primitives not handled here must be handled at the
421 level of the specific code generator.
425 :: PrimRep -- Rep of first destination
426 -> [StixTree] -- Destinations
432 Now look for something more conventional.
435 simplePrim pk [lhs] op rest = StAssign pk lhs (StPrim op rest)
436 simplePrim pk as op bs = simplePrim_error op
439 = error ("ERROR: primitive operation `"++show op++"'cannot be handled\nby the native-code generator. Workaround: use -fvia-C.\n(Perhaps you should report it as a GHC bug, also.)\n")
442 %---------------------------------------------------------------------
444 Here we generate the Stix code for CAddrModes.
446 When a character is fetched from a mixed type location, we have to do
447 an extra cast. This is reflected in amodeCode', which is for rhs
448 amodes that might possibly need the extra cast.
451 amodeToStix, amodeToStix' :: CAddrMode -> StixTree
453 amodeToStix'{-'-} am@(CVal rr CharRep)
454 | mixedTypeLocn am = StPrim ChrOp [amodeToStix am]
455 | otherwise = amodeToStix am
457 amodeToStix' am = amodeToStix am
460 amodeToStix am@(CVal rr CharRep)
462 = StInd IntRep (amodeToStix (CAddr rr))
464 amodeToStix (CVal rr pk) = StInd pk (amodeToStix (CAddr rr))
466 amodeToStix (CAddr (SpRel off))
467 = StIndex PtrRep stgSp (StInt (toInteger IBOX(off)))
469 amodeToStix (CAddr (HpRel off))
470 = StIndex IntRep stgHp (StInt (toInteger (- IBOX(off))))
472 amodeToStix (CAddr (NodeRel off))
473 = StIndex IntRep stgNode (StInt (toInteger IBOX(off)))
475 amodeToStix (CAddr (CIndex base off pk))
476 = StIndex pk (amodeToStix base) (amodeToStix off)
478 amodeToStix (CReg magic) = StReg (StixMagicId magic)
479 amodeToStix (CTemp uniq pk) = StReg (StixTemp uniq pk)
481 amodeToStix (CLbl lbl _) = StCLbl lbl
483 -- For CharLike and IntLike, we attempt some trivial constant-folding here.
485 amodeToStix (CCharLike (CLit (MachChar c)))
486 = StIndex Int8Rep cHARLIKE_closure (StInt (toInteger off))
488 off = charLikeSize * (c - mIN_CHARLIKE)
490 amodeToStix (CCharLike x)
493 amodeToStix (CIntLike (CLit (MachInt i)))
494 = StIndex Int8Rep iNTLIKE_closure (StInt (toInteger off))
496 off = intLikeSize * (fromInteger (i - mIN_INTLIKE))
498 amodeToStix (CIntLike x)
501 amodeToStix (CLit core)
503 MachChar c -> StInt (toInteger c)
504 MachStr s -> StString s
505 MachAddr a -> StInt a
507 MachWord w -> case word2IntLit core of MachInt iw -> StInt iw
508 MachLitLit s _ -> litLitErr
509 MachLabel l -> StCLbl (mkForeignLabel l False{-ToDo: dynamic-})
510 MachFloat d -> StFloat d
511 MachDouble d -> StDouble d
512 _ -> panic "amodeToStix:core literal"
514 amodeToStix (CMacroExpr _ macro [arg])
516 ENTRY_CODE -> amodeToStix arg
517 ARG_TAG -> amodeToStix arg -- just an integer no. of words
519 #ifdef WORDS_BIGENDIAN
521 [StInd WordRep (StIndex PtrRep (amodeToStix arg)
522 (StInt (toInteger (-1)))),
526 [StInd WordRep (StIndex PtrRep (amodeToStix arg)
527 (StInt (toInteger (-1)))),
531 -> StInd PtrRep (StIndex PtrRep (amodeToStix arg)
532 (StInt (toInteger uF_UPDATEE)))
535 panic "native code generator can't compile lit-lits, use -fvia-C"
538 Sizes of the CharLike and IntLike closures that are arranged as arrays
539 in the data segment. (These are in bytes.)
542 -- The INTLIKE base pointer
544 iNTLIKE_closure :: StixTree
545 iNTLIKE_closure = StCLbl mkIntlikeClosureLabel
549 cHARLIKE_closure :: StixTree
550 cHARLIKE_closure = StCLbl mkCharlikeClosureLabel
552 mutArrPtrsFrozen_info = StCLbl mkMAP_FROZEN_infoLabel
554 -- these are the sizes of charLike and intLike closures, in _bytes_.
555 charLikeSize = (fixedHdrSize + 1) * (fromInteger (sizeOf PtrRep))
556 intLikeSize = (fixedHdrSize + 1) * (fromInteger (sizeOf PtrRep))
562 = getUniqueUs `thenUs` \tso_uq ->
563 let tso = StReg (StixTemp tso_uq ThreadIdRep) in
565 StAssign ThreadIdRep tso stgCurrentTSO :
567 (StInd PtrRep (StPrim IntAddOp
568 [tso, StInt (toInteger (TSO_SP*BYTES_PER_WORD))]))
571 (StInd PtrRep (StPrim IntAddOp
572 [tso, StInt (toInteger (TSO_SU*BYTES_PER_WORD))]))
575 (StInd PtrRep (StPrim IntAddOp
577 StInt (toInteger (BDESCR_FREE * BYTES_PER_WORD))]))
578 (StPrim IntAddOp [stgHp, StInt (toInteger (1 * BYTES_PER_WORD))]) :
583 = getUniqueUs `thenUs` \tso_uq ->
584 let tso = StReg (StixTemp tso_uq ThreadIdRep) in
586 StAssign ThreadIdRep tso stgCurrentTSO :
587 StAssign PtrRep stgSp
588 (StInd PtrRep (StPrim IntAddOp
589 [tso, StInt (toInteger (TSO_SP*BYTES_PER_WORD))])) :
590 StAssign PtrRep stgSu
591 (StInd PtrRep (StPrim IntAddOp
592 [tso, StInt (toInteger (TSO_SU*BYTES_PER_WORD))])) :
593 StAssign PtrRep stgSpLim
594 (StPrim IntAddOp [tso,
595 StInt (toInteger ((TSO_STACK + rESERVED_STACK_WORDS)
596 *BYTES_PER_WORD))]) :
597 StAssign PtrRep stgHp
599 StInd PtrRep (StPrim IntAddOp
601 StInt (toInteger (BDESCR_FREE * BYTES_PER_WORD))]),
602 StInt (toInteger (1 * BYTES_PER_WORD))
604 StAssign PtrRep stgHpLim
606 StInd PtrRep (StPrim IntAddOp
608 StInt (toInteger (BDESCR_START * BYTES_PER_WORD))]),
609 StInt (toInteger (bLOCK_SIZE - (1 * BYTES_PER_WORD)))