anchor.diff:          uint64   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
           bool     -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
           {enum,_} -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
  -        fixed32  -> format_uf32_field_decoder(MsgName, Field, AnRes);
  -        sfixed32 -> format_sf32_field_decoder(MsgName, Field, AnRes);
  -        float    -> format_float_field_decoder(MsgName, Field, AnRes);
  -        fixed64  -> format_uf64_field_decoder(MsgName, Field, AnRes);
  -        sfixed64 -> format_sf64_field_decoder(MsgName, Field, AnRes);
  -        double   -> format_double_field_decoder(MsgName, Field, AnRes);
  +        fixed32  -> format_fixlen_field_decoder(MsgName, Field, AnRes);
  +        sfixed32 -> format_fixlen_field_decoder(MsgName, Field, AnRes);
  +        float    -> format_fixlen_field_decoder(MsgName, Field, AnRes);
  +        fixed64  -> format_fixlen_field_decoder(MsgName, Field, AnRes);
  +        sfixed64 -> format_fixlen_field_decoder(MsgName, Field, AnRes);
  +        double   -> format_fixlen_field_decoder(MsgName, Field, AnRes);
           string   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
           bytes    -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
           {msg,_}  -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts)
  
positive.code:         replace_tree('<Res>', ResVar),
          replace_tree('<Value>', ValueExpr)]).
  
  format_uf32_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 32, 'little', FieldDef, AnRes).
  
  format_sf32_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 32, 'little-signed', FieldDef, AnRes).
  
  format_float_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 32, 'little-float', FieldDef, AnRes).
  
  format_uf64_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 64, 'little', FieldDef, AnRes).
  
  format_sf64_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 64, 'little-signed', FieldDef, AnRes).
  
  format_double_field_decoder(MsgName, FieldDef, AnRes) ->
      format_f_field_decoder(MsgName, 64, 'little-float', FieldDef, AnRes).
  
  format_f_field_decoder(MsgName, BitLen, BitType, FieldDef, AnRes) ->
      case get_field_pass(MsgName, AnRes) of
          pass_as_params ->
              format_f_field_decoder_pap(MsgName, BitLen, BitType, FieldDef,
                                         AnRes);
          pass_as_record ->
              format_f_field_decoder_par(MsgName, BitLen, BitType, FieldDef)
      end.
  
  format_f_field_decoder_pap(MsgName, BitLen, BitType, FieldDef, AnRes) ->
      NF = get_num_fields(MsgName, AnRes),
      #field{rnum=RNum, name=FName}=FieldDef,
      Merge = classify_field_merge_action(FieldDef),
      InFieldVars = [[", ", if I == RNum-1, Merge == overwrite -> "_";
                               I == RNum-1, Merge == seqadd    -> f("F~w", [I]);
                               I /= RNum-1                     -> f("F~w", [I])
                            end]
                     || I <- lists:seq(1, NF)],
      MergeCode = case Merge of
                      overwrite -> "";
                      seqadd    -> f("    Value2 = [Value | F~w],~n", [RNum-1])
                  end,
      OutFieldVars = [[", ", if I == RNum-1, Merge == overwrite -> "Value";
                                I == RNum-1, Merge == seqadd    -> "Value2";
                                I /= RNum-1                     -> f("F~w", [I])
                             end]
                      || I <- lists:seq(1, NF)],
  
      [f("~p(<<Value:~p/~s, Rest/binary>>, _, _~s) ->~n",
         [mk_fn(d_field_, MsgName, FName), BitLen, BitType, InFieldVars]),
       f("~s", [MergeCode]),
       f("    ~p(Rest, 0, 0~s).~n",
         [mk_fn(d_read_field_def_, MsgName), OutFieldVars])].
  
  format_f_field_decoder_par(MsgName, BitLen, BitType, FieldDef)  ->
      #field{name=FName}=FieldDef,
      [f("~p(<<Value:~p/~s, Rest/binary>>, Msg) ->~n",
         [mk_fn(d_field_, MsgName, FName), BitLen, BitType]),
       f("    NewMsg = ~p(Value, Msg),~n", [mk_fn(add_field_, MsgName, FName)]),
       f("    ~p(Rest, 0, 0, NewMsg).~n",
         [mk_fn(d_read_field_def_, MsgName)])].
  
  format_msg_decoder_reverse_toplevel(MsgName, MsgDef, AnRes) ->
      case get_field_pass(MsgName, AnRes) of
  
negative.code:     ErlCode2 = replace_module_macro(ErlCode, ModAsStr),
      {ok, Toks, _EndLine} = erl_scan:string(ErlCode2),
      FormToks = split_toks_at_dot(Toks),
      Forms = [case erl_parse:parse_form(Ts) of
                   {ok, Form} ->
                       Form;
                   {error, Reason} ->
                       erlang:error(
                         {internal_error,?MODULE,Mod,ErlCode2,MsgDefs,
                          PossibleNifCode,Opts,Reason})
               end
               || Ts <- FormToks],
      {AttrForms, CodeForms} = split_forms_at_first_code(Forms),
      FieldDef = field_record_to_attr_form(),
      MsgRecordForms = msgdefs_to_record_attrs(MsgDefs),
  